added userDtos
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
|
||||
import { defineStore } from "pinia";
|
||||
import type { User } from "../models/User.ts";
|
||||
import type { UserDto } from "../models/User.ts";
|
||||
import * as usersApi from "../api/UsersApi";
|
||||
|
||||
interface UserState {
|
||||
users: User[];
|
||||
users: UserDto[];
|
||||
loading: boolean;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export const useUsersStore = defineStore("users", {
|
||||
this.loading = false;
|
||||
},
|
||||
|
||||
async removeUser(id: number) {
|
||||
async removeUser(id: string) {
|
||||
await usersApi.deleteUser(id);
|
||||
this.users = this.users.filter(i => i.id !== id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user