Update store to handle nested users and groups response objects
This commit is contained in:
parent
f3c5e78ffa
commit
e2e7f5f9e3
2 changed files with 3 additions and 3 deletions
|
|
@ -18,7 +18,7 @@ export const useGroupStore = defineStore('group', {
|
|||
this.loading = true;
|
||||
const url = `${config.backendUrl}/groups`;
|
||||
const resp = await performRequest(this,'GET', url, null);
|
||||
this.groups = resp.data;
|
||||
this.groups = resp.data.groups;
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@ export const useUsersStore = defineStore('users', {
|
|||
};
|
||||
|
||||
this.loading = false;
|
||||
this.empty = data.length === 0;
|
||||
this.users = data;
|
||||
this.empty = data.users.length === 0;
|
||||
this.users = data.users;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue