aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2022-02-10 22:07:00 +0100
committerBastien Wirtz <bastien.wirtz@gmail.com>2022-02-10 22:07:00 +0100
commit893690cf95eda1233a094e0d1b63011ff740989e (patch)
tree280dcf3b57349bfff6a7d6d5cc6b9936b3b749ac /src
parentdec7e466b981ba48390e4771ba0f4e54a311c181 (diff)
downloadhomer-893690cf95eda1233a094e0d1b63011ff740989e.tar.gz
homer-893690cf95eda1233a094e0d1b63011ff740989e.tar.zst
homer-893690cf95eda1233a094e0d1b63011ff740989e.zip
Lint fixesv22.02.1
Diffstat (limited to 'src')
-rw-r--r--src/App.vue1
-rw-r--r--src/components/services/Prowlarr.vue24
2 files changed, 13 insertions, 12 deletions
diff --git a/src/App.vue b/src/App.vue
index 4eb112d..9a67a33 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -211,6 +211,7 @@ export default {
211 window.location.href = response.url; 211 window.location.href = response.url;
212 return; 212 return;
213 } 213 }
214
214 if (!response.ok) { 215 if (!response.ok) {
215 throw Error(`${response.statusText}: ${response.body}`); 216 throw Error(`${response.statusText}: ${response.body}`);
216 } 217 }
diff --git a/src/components/services/Prowlarr.vue b/src/components/services/Prowlarr.vue
index c122ca0..abaa0f0 100644
--- a/src/components/services/Prowlarr.vue
+++ b/src/components/services/Prowlarr.vue
@@ -21,8 +21,8 @@
21</template> 21</template>
22 22
23<script> 23<script>
24import service from "@/mixins/service.js" 24import service from "@/mixins/service.js";
25import Generic from "./Generic.vue" 25import Generic from "./Generic.vue";
26 26
27export default { 27export default {
28 name: "Prowlarr", 28 name: "Prowlarr",
@@ -38,32 +38,32 @@ export default {
38 warnings: null, 38 warnings: null,
39 errors: null, 39 errors: null,
40 serverError: false, 40 serverError: false,
41 } 41 };
42 }, 42 },
43 created: function () { 43 created: function () {
44 this.fetchConfig() 44 this.fetchConfig();
45 }, 45 },
46 methods: { 46 methods: {
47 fetchConfig: function () { 47 fetchConfig: function () {
48 this.fetch(`/api/v1/health?apikey=${this.item.apikey}`) 48 this.fetch(`/api/v1/health?apikey=${this.item.apikey}`)
49 .then((health) => { 49 .then((health) => {
50 this.warnings = 0 50 this.warnings = 0;
51 this.errors = 0 51 this.errors = 0;
52 for (var i = 0; i < health.length; i++) { 52 for (var i = 0; i < health.length; i++) {
53 if (health[i].type == "warning") { 53 if (health[i].type == "warning") {
54 this.warnings++ 54 this.warnings++;
55 } else if (health[i].type == "error") { 55 } else if (health[i].type == "error") {
56 this.errors++ 56 this.errors++;
57 } 57 }
58 } 58 }
59 }) 59 })
60 .catch((e) => { 60 .catch((e) => {
61 console.error(e) 61 console.error(e);
62 this.serverError = true 62 this.serverError = true;
63 }) 63 });
64 }, 64 },
65 }, 65 },
66} 66};
67</script> 67</script>
68 68
69<style scoped lang="scss"> 69<style scoped lang="scss">