aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components
diff options
context:
space:
mode:
authorFloren Munteanu <fmunteanu@users.noreply.github.com>2023-02-19 15:18:56 -0500
committerGitHub <noreply@github.com>2023-02-19 12:18:56 -0800
commitd362add383b622c4b941e8bdd02b741393c65bd0 (patch)
tree44d2e18100e760f3637d62aac2bb0fbddb0c0310 /src/components
parentdfde8ea89d02f59f5408585702c0f2cf3f94eac1 (diff)
downloadhomer-23.02.2.tar.gz
homer-23.02.2.tar.zst
homer-23.02.2.zip
Implement PiHole API token (#580)v23.02.2
Implement PiHole API token
Diffstat (limited to 'src/components')
-rw-r--r--src/components/services/PiHole.vue6
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;