[api] add filter for get_users
This commit is contained in:
parent
cc29893e04
commit
53f053a294
|
@ -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) {
|
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) => {
|
data.forEach((user) => {
|
||||||
if (user.birthday) user.birthday = new Date(user.birthday);
|
if (user.birthday) user.birthday = new Date(user.birthday);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue