diff --git a/src/widgets/pihole/component.jsx b/src/widgets/pihole/component.jsx index f213ac6d..c39250d2 100644 --- a/src/widgets/pihole/component.jsx +++ b/src/widgets/pihole/component.jsx @@ -9,7 +9,7 @@ export default function Component({ service }) { const { widget } = service; - const { data: piholeData, error: piholeError } = useWidgetAPI(widget, "api.php"); + const { data: piholeData, error: piholeError } = useWidgetAPI(widget, "summaryRaw"); if (piholeError) { return ; @@ -27,9 +27,9 @@ export default function Component({ service }) { return ( - - - + + + ); } diff --git a/src/widgets/pihole/widget.js b/src/widgets/pihole/widget.js index b392cded..e7593810 100644 --- a/src/widgets/pihole/widget.js +++ b/src/widgets/pihole/widget.js @@ -1,12 +1,12 @@ import genericProxyHandler from "utils/proxy/handlers/generic"; const widget = { - api: "{url}/admin/{endpoint}", + api: "{url}/admin/api.php?{endpoint}&auth={key}", proxyHandler: genericProxyHandler, mappings: { - "api.php": { - endpoint: "api.php", + "summaryRaw": { + endpoint: "summaryRaw", validate: [ "dns_queries_today", "ads_blocked_today",