From e2e7f5f9e3e19f900f58d8f7cf251b4756d48c6d Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 27 Nov 2025 17:27:07 +0100 Subject: [PATCH] Update store to handle nested `users` and `groups` response objects --- src/frontend/src/store/group.js | 2 +- src/frontend/src/store/users.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/store/group.js b/src/frontend/src/store/group.js index c3c2e35..f5ddf1a 100644 --- a/src/frontend/src/store/group.js +++ b/src/frontend/src/store/group.js @@ -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; } } diff --git a/src/frontend/src/store/users.js b/src/frontend/src/store/users.js index 9adc32c..9d48c3d 100644 --- a/src/frontend/src/store/users.js +++ b/src/frontend/src/store/users.js @@ -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; } }