Lint fixes

This commit is contained in:
Bastien Wirtz 2022-02-10 22:07:00 +01:00
parent dec7e466b9
commit 893690cf95
3 changed files with 16 additions and 15 deletions

View File

@ -211,6 +211,7 @@ export default {
window.location.href = response.url; window.location.href = response.url;
return; return;
} }
if (!response.ok) { if (!response.ok) {
throw Error(`${response.statusText}: ${response.body}`); throw Error(`${response.statusText}: ${response.body}`);
} }

View File

@ -21,8 +21,8 @@
</template> </template>
<script> <script>
import service from "@/mixins/service.js" import service from "@/mixins/service.js";
import Generic from "./Generic.vue" import Generic from "./Generic.vue";
export default { export default {
name: "Prowlarr", name: "Prowlarr",
@ -38,32 +38,32 @@ export default {
warnings: null, warnings: null,
errors: null, errors: null,
serverError: false, serverError: false,
} };
}, },
created: function () { created: function () {
this.fetchConfig() this.fetchConfig();
}, },
methods: { methods: {
fetchConfig: function () { fetchConfig: function () {
this.fetch(`/api/v1/health?apikey=${this.item.apikey}`) this.fetch(`/api/v1/health?apikey=${this.item.apikey}`)
.then((health) => { .then((health) => {
this.warnings = 0 this.warnings = 0;
this.errors = 0 this.errors = 0;
for (var i = 0; i < health.length; i++) { for (var i = 0; i < health.length; i++) {
if (health[i].type == "warning") { if (health[i].type == "warning") {
this.warnings++ this.warnings++;
} else if (health[i].type == "error") { } else if (health[i].type == "error") {
this.errors++ this.errors++;
} }
} }
}) })
.catch((e) => { .catch((e) => {
console.error(e) console.error(e);
this.serverError = true this.serverError = true;
}) });
}, },
}, },
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -2339,9 +2339,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0" lodash.uniq "^4.5.0"
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001219: caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001219:
version "1.0.30001245" version "1.0.30001311"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001245.tgz#45b941bbd833cb0fa53861ff2bae746b3c6ca5d4" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001311.tgz"
integrity sha512-768fM9j1PKXpOCKws6eTo3RHmvTUsG9UrpT4WoREFeZgJBTi4/X9g565azS/rVUGtqb8nt7FjLeF5u4kukERnA== integrity sha512-mleTFtFKfykEeW34EyfhGIFjGCqzhh38Y0LhdQ9aWF+HorZTtdgKV/1hEE0NlFkG2ubvisPV6l400tlbPys98A==
case-sensitive-paths-webpack-plugin@^2.3.0: case-sensitive-paths-webpack-plugin@^2.3.0:
version "2.4.0" version "2.4.0"