[api] add filter for get_users

This commit is contained in:
Tim Gröger 2021-11-22 15:08:28 +01:00
parent cc29893e04
commit 53f053a294
1 changed files with 4 additions and 2 deletions

View File

@ -37,9 +37,11 @@ export const useUserStore = defineStore({
}
},
async getUsers(force = false) {
async getUsers(force = false, filter?: {userids: undefined|string}) {
if (force || this._dirty_users) {
const { data } = await api.get<FG.User[]>('/users');
const { data } = await api.get<FG.User[]>('/users', {
params: filter
});
data.forEach((user) => {
if (user.birthday) user.birthday = new Date(user.birthday);
});