diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/services/PiHole.vue | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/components/services/PiHole.vue b/src/components/services/PiHole.vue index 9aac016..237cb12 100644 --- a/src/components/services/PiHole.vue +++ b/src/components/services/PiHole.vue | |||
@@ -49,7 +49,11 @@ export default { | |||
49 | }, | 49 | }, |
50 | methods: { | 50 | methods: { |
51 | fetchStatus: async function () { | 51 | fetchStatus: async function () { |
52 | const result = await this.fetch("/api.php").catch((e) => console.log(e)); | 52 | const authQueryParams = this.item.apikey |
53 | ? `?summaryRaw&auth=${this.item.apikey}` | ||
54 | : ""; | ||
55 | const result = await this.fetch(`/api.php${authQueryParams}`) | ||
56 | .catch((e) => console.log(e)); | ||
53 | 57 | ||
54 | this.status = result.status; | 58 | this.status = result.status; |
55 | this.ads_percentage_today = result.ads_percentage_today; | 59 | this.ads_percentage_today = result.ads_percentage_today; |