Update store to handle nested users and groups response objects

This commit is contained in:
Jan 2025-11-27 17:27:07 +01:00
parent 6c6ed2a498
commit b2973fcd18
2 changed files with 3 additions and 3 deletions

View file

@ -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;
}
}

View file

@ -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;
}
}