mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-19 09:00:29 +00:00
chore: developer cleanup (#300)
* new PR tasks * add homebox to know words * formatting * bump deps * generate db models * ts errors * drop id * fix accessor * drop unused time field * change CI * add expected error * add type check * resolve serveral type errors * hoise in CI
This commit is contained in:
parent
88f9ff90d4
commit
bd321af29f
142 changed files with 817 additions and 1200 deletions
|
@ -14,13 +14,17 @@ export const useLabelStore = defineStore("labels", {
|
|||
*/
|
||||
labels(state): LabelOut[] {
|
||||
if (state.allLabels === null) {
|
||||
Promise.resolve(this.refresh());
|
||||
this.client.labels.getAll().then(result => {
|
||||
if (result.error) {
|
||||
console.error(result.error);
|
||||
}
|
||||
});
|
||||
}
|
||||
return state.allLabels;
|
||||
return state.allLabels ?? [];
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
async refresh(): Promise<LabelOut[]> {
|
||||
async refresh() {
|
||||
const result = await this.client.labels.getAll();
|
||||
if (result.error) {
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue