From 4ce53b68ea7143433bac39aa955a49981ceb6536 Mon Sep 17 00:00:00 2001
From: Bram Ceulemans
Date: Thu, 10 Dec 2020 00:07:53 +0100
Subject: [PATCH] Fixed wrongly removed computed property
---
src/components/services/PiHole.vue | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/components/services/PiHole.vue b/src/components/services/PiHole.vue
index 03d3ae3..a9fd369 100644
--- a/src/components/services/PiHole.vue
+++ b/src/components/services/PiHole.vue
@@ -20,13 +20,13 @@
{{ item.subtitle }}
-
+
{{ percentage }}% blocked
-
- {{ status.status }}
+
+ {{ api.status }}
@@ -45,15 +45,15 @@ export default {
item: Object,
},
data: () => ({
- status: {
+ api: {
status: "",
ads_percentage_today: 0,
},
}),
computed: {
percentage: function () {
- if (this.status) {
- return this.status.ads_percentage_today.toFixed(1);
+ if (this.api) {
+ return this.api.ads_percentage_today.toFixed(1);
}
return "";
},
@@ -64,7 +64,7 @@ export default {
methods: {
fetchStatus: async function () {
const url = `${this.item.url}/api.php`;
- this.status = await fetch(url)
+ this.api = await fetch(url)
.then((response) => response.json())
.catch((e) => console.log(e));
},
--
2.41.0