Skip to content

Commit

Permalink
chore(lint): Apply on latest additions
Browse files Browse the repository at this point in the history
  • Loading branch information
bastienwirtz committed Jun 1, 2024
1 parent 95fde89 commit e23868c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
"vite-plugin-pwa": "^0.20.0"
},
"license": "Apache-2.0",
"packageManager": "[email protected].2+sha256.19c17528f9ca20bd442e4ca42f00f1b9808a9cb419383cd04ba32ef19322aba7"
"packageManager": "[email protected].4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0"
}
31 changes: 11 additions & 20 deletions src/components/services/HomeAssistant.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export default {
computed: {
headers: function () {
return {
'Authorization': `Bearer ${this.item.apikey}`,
'Content-Type': 'application/json',
Authorization: `Bearer ${this.item.apikey}`,
"Content-Type": "application/json",
};
},
details: function () {
Expand All @@ -57,27 +57,19 @@ export default {
switch (key) {
case "version":
details.push(
`v${this.version}`,
);
details.push(`v${this.version}`);
break;
case "name":
details.push(
`${this.location_name}`,
);
details.push(`${this.location_name}`);
break;
case "entities":
details.push(
`${this.entities} entities`,
);
details.push(`${this.entities} entities`);
break;
default:
details.push(
`undefined key ${key} `,
);
details.push(`undefined key ${key} `);
}
}
return details.join(separator);
},
},
Expand Down Expand Up @@ -112,9 +104,9 @@ export default {
.then((response) => {
if (response) {
if (response.version) this.version = response.version;
if (response.location_name) this.location_name = response.location_name;
}
else throw new Error();
if (response.location_name)
this.location_name = response.location_name;
} else throw new Error();
})
.catch((e) => {
console.log(e);
Expand All @@ -125,8 +117,7 @@ export default {
.then((response) => {
if (response) {
this.entities = response.length;
}
else throw new Error();
} else throw new Error();
})
.catch((e) => {
console.log(e);
Expand Down

0 comments on commit e23868c

Please sign in to comment.