chore(lint): Apply on latest additions

pull/785/head
Bastien Wirtz 2024-06-01 16:15:13 +02:00
parent 95fde896e0
commit e23868c594
2 changed files with 12 additions and 21 deletions

View File

@ -29,5 +29,5 @@
"vite-plugin-pwa": "^0.20.0" "vite-plugin-pwa": "^0.20.0"
}, },
"license": "Apache-2.0", "license": "Apache-2.0",
"packageManager": "pnpm@9.1.2+sha256.19c17528f9ca20bd442e4ca42f00f1b9808a9cb419383cd04ba32ef19322aba7" "packageManager": "pnpm@9.1.4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0"
} }

View File

@ -43,8 +43,8 @@ export default {
computed: { computed: {
headers: function () { headers: function () {
return { return {
'Authorization': `Bearer ${this.item.apikey}`, Authorization: `Bearer ${this.item.apikey}`,
'Content-Type': 'application/json', "Content-Type": "application/json",
}; };
}, },
details: function () { details: function () {
@ -57,27 +57,19 @@ export default {
switch (key) { switch (key) {
case "version": case "version":
details.push( details.push(`v${this.version}`);
`v${this.version}`,
);
break; break;
case "name": case "name":
details.push( details.push(`${this.location_name}`);
`${this.location_name}`,
);
break; break;
case "entities": case "entities":
details.push( details.push(`${this.entities} entities`);
`${this.entities} entities`,
);
break; break;
default: default:
details.push( details.push(`undefined key ${key} `);
`undefined key ${key} `,
);
} }
} }
return details.join(separator); return details.join(separator);
}, },
}, },
@ -112,9 +104,9 @@ export default {
.then((response) => { .then((response) => {
if (response) { if (response) {
if (response.version) this.version = response.version; if (response.version) this.version = response.version;
if (response.location_name) this.location_name = response.location_name; if (response.location_name)
} this.location_name = response.location_name;
else throw new Error(); } else throw new Error();
}) })
.catch((e) => { .catch((e) => {
console.log(e); console.log(e);
@ -125,8 +117,7 @@ export default {
.then((response) => { .then((response) => {
if (response) { if (response) {
this.entities = response.length; this.entities = response.length;
} } else throw new Error();
else throw new Error();
}) })
.catch((e) => { .catch((e) => {
console.log(e); console.log(e);