diff --git a/api/src/stores/user.ts b/api/src/stores/user.ts index 6981c1d..41bc2a2 100644 --- a/api/src/stores/user.ts +++ b/api/src/stores/user.ts @@ -65,6 +65,13 @@ export const useUserStore = defineStore({ return data; }, + async deleteUser(user: FG.User | string) { + if (typeof user === 'object') user = user.userid; + + await api.delete(`/users/${user}`); + this.users = this.users.filter(u => u.userid != user); + }, + async uploadAvatar(user: FG.User, file: string | File) { const formData = new FormData(); formData.append('file', file);