From 1d3287dcca801a000dbdb40ef20fd26a97ebb2e3 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Sat, 25 Sep 2021 12:12:22 +0200 Subject: Apply linters --- src/components/services/Mealie.vue | 51 ++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 27 deletions(-) (limited to 'src/components/services') diff --git a/src/components/services/Mealie.vue b/src/components/services/Mealie.vue index acff1fb..790a9b1 100644 --- a/src/components/services/Mealie.vue +++ b/src/components/services/Mealie.vue @@ -20,9 +20,7 @@ - + @@ -54,37 +52,36 @@ export default { methods: { fetchStatus: async function () { if (this.item.subtitle != null) return; // omitting unnecessary ajax call as the subtitle is showing - var apikey = this.item.apikey; this.meal = await fetch(`${this.item.url}/api/meal-plans/today/`, { headers: { - "Authorization": "Bearer " + this.item.apikey, - "Accept": "application/json" - } + Authorization: "Bearer " + this.item.apikey, + Accept: "application/json", + }, }) - .then(function(response) { - if (!response.ok) { - throw new Error("Not 2xx response") - } else { - if (response != null) { - return response.json(); + .then(function (response) { + if (!response.ok) { + throw new Error("Not 2xx response"); + } else { + if (response != null) { + return response.json(); + } } - } - }) - .catch((e) => console.log(e)); + }) + .catch((e) => console.log(e)); this.stats = await fetch(`${this.item.url}/api/debug/statistics/`, { headers: { - "Authorization": "Bearer " + this.item.apikey, - "Accept": "application/json" - } + Authorization: "Bearer " + this.item.apikey, + Accept: "application/json", + }, }) - .then(function(response) { - if (!response.ok) { - throw new Error("Not 2xx response") - } else { - return response.json(); - } - }) - .catch((e) => console.log(e)); + .then(function (response) { + if (!response.ok) { + throw new Error("Not 2xx response"); + } else { + return response.json(); + } + }) + .catch((e) => console.log(e)); }, }, }; -- cgit v1.2.3