From 15cc1d98c5199719284837618dc091c17d28b86c Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 4 Jun 2024 07:28:45 -0700 Subject: [PATCH] Fix: omada widget broken in v0.9.1 (#3587) --- src/widgets/omada/component.jsx | 2 +- src/widgets/omada/widget.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/widgets/omada/component.jsx b/src/widgets/omada/component.jsx index c4da60677..e63f93d36 100644 --- a/src/widgets/omada/component.jsx +++ b/src/widgets/omada/component.jsx @@ -9,7 +9,7 @@ export default function Component({ service }) { const { widget } = service; - const { data: omadaData, error: omadaAPIError } = useWidgetAPI(widget, { + const { data: omadaData, error: omadaAPIError } = useWidgetAPI(widget, "info", { refreshInterval: 5000, }); diff --git a/src/widgets/omada/widget.js b/src/widgets/omada/widget.js index 5e32edad7..3f5a70a16 100644 --- a/src/widgets/omada/widget.js +++ b/src/widgets/omada/widget.js @@ -2,6 +2,12 @@ import omadaProxyHandler from "./proxy"; const widget = { proxyHandler: omadaProxyHandler, + + mappings: { + info: { + endpoint: "api/info", + }, + }, }; export default widget;