diff options
author | Robin Schneider <45321827+robinschneider@users.noreply.github.com> | 2021-10-10 21:41:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-10 21:41:23 +0200 |
commit | 7a4e78e8d0448541e76f6052c45f00b30cdf60e1 (patch) | |
tree | 77be480ad42c3e1a64005a1974206dc249273bbb /src/components/services/AdGuardHome.vue | |
parent | 3faeac7e9fc3601283c58e2d585e00f346250e10 (diff) | |
parent | 66a434e7dba49011dd5401e32bb45ab180a73a11 (diff) | |
download | homer-7a4e78e8d0448541e76f6052c45f00b30cdf60e1.tar.gz homer-7a4e78e8d0448541e76f6052c45f00b30cdf60e1.tar.zst homer-7a4e78e8d0448541e76f6052c45f00b30cdf60e1.zip |
Merge branch 'bastienwirtz:main' into icon-color
Diffstat (limited to 'src/components/services/AdGuardHome.vue')
-rw-r--r-- | src/components/services/AdGuardHome.vue | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/components/services/AdGuardHome.vue b/src/components/services/AdGuardHome.vue index 16881fa..b01f0f4 100644 --- a/src/components/services/AdGuardHome.vue +++ b/src/components/services/AdGuardHome.vue | |||
@@ -20,10 +20,12 @@ | |||
20 | </template> | 20 | </template> |
21 | 21 | ||
22 | <script> | 22 | <script> |
23 | import service from "@/mixins/service.js"; | ||
23 | import Generic from "./Generic.vue"; | 24 | import Generic from "./Generic.vue"; |
24 | 25 | ||
25 | export default { | 26 | export default { |
26 | name: "AdGuardHome", | 27 | name: "AdGuardHome", |
28 | mixins: [service], | ||
27 | props: { | 29 | props: { |
28 | item: Object, | 30 | item: Object, |
29 | }, | 31 | }, |
@@ -60,18 +62,14 @@ export default { | |||
60 | }, | 62 | }, |
61 | methods: { | 63 | methods: { |
62 | fetchStatus: async function () { | 64 | fetchStatus: async function () { |
63 | this.status = await fetch(`${this.item.url}/control/status`, { | 65 | this.status = await this.fetch("/control/status").catch((e) => |
64 | credentials: "include", | 66 | console.log(e) |
65 | }) | 67 | ); |
66 | .then((response) => response.json()) | ||
67 | .catch((e) => console.log(e)); | ||
68 | }, | 68 | }, |
69 | fetchStats: async function () { | 69 | fetchStats: async function () { |
70 | this.stats = await fetch(`${this.item.url}/control/stats`, { | 70 | this.stats = await this.fetch("/control/stats").catch((e) => |
71 | credentials: "include", | 71 | console.log(e) |
72 | }) | 72 | ); |
73 | .then((response) => response.json()) | ||
74 | .catch((e) => console.log(e)); | ||
75 | }, | 73 | }, |
76 | }, | 74 | }, |
77 | }; | 75 | }; |