add typing for userList and change userId parameter type
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
let userName = $state('')
|
||||
let userPassword = $state('')
|
||||
let userList = $state([])
|
||||
let userList: { userId: string; userName: string }[] = $state([])
|
||||
let addUserError = $state(false);
|
||||
let addUserSuccess = $state(false);
|
||||
const currentUser: string = data.user.id;
|
||||
@@ -65,7 +65,7 @@
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
async function deleteUser(userId: number) {
|
||||
async function deleteUser(userId: string) {
|
||||
const URL = `/api/users/${userId}`;
|
||||
|
||||
const response = await fetch(URL, {
|
||||
|
||||
Reference in New Issue
Block a user