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