diff options
author | Floren Munteanu <fmunteanu@users.noreply.github.com> | 2023-02-19 15:18:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-19 12:18:56 -0800 |
commit | d362add383b622c4b941e8bdd02b741393c65bd0 (patch) | |
tree | 44d2e18100e760f3637d62aac2bb0fbddb0c0310 /src/components/services/PiHole.vue | |
parent | dfde8ea89d02f59f5408585702c0f2cf3f94eac1 (diff) | |
download | homer-d362add383b622c4b941e8bdd02b741393c65bd0.tar.gz homer-d362add383b622c4b941e8bdd02b741393c65bd0.tar.zst homer-d362add383b622c4b941e8bdd02b741393c65bd0.zip |
Implement PiHole API token (#580)v23.02.2
Implement PiHole API token
Diffstat (limited to 'src/components/services/PiHole.vue')
-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; |