|
|
|
@@ -66,7 +66,7 @@ export const editUser = async (id: number, data: UserInputs) => { |
|
|
|
}; |
|
|
|
|
|
|
|
export const createUser = async (data: UserInputs) => { |
|
|
|
const newUser = serverFetchWithNoContent(`${BASE_API_URL}/user/save`, { |
|
|
|
const newUser = await serverFetchWithNoContent(`${BASE_API_URL}/user/save`, { |
|
|
|
method: "POST", |
|
|
|
body: JSON.stringify(data), |
|
|
|
headers: { "Content-Type": "application/json" }, |
|
|
|
@@ -76,7 +76,7 @@ export const createUser = async (data: UserInputs) => { |
|
|
|
}; |
|
|
|
|
|
|
|
export const deleteUser = async (id: number) => { |
|
|
|
const newUser = serverFetchWithNoContent(`${BASE_API_URL}/user/${id}`, { |
|
|
|
const newUser = await serverFetchWithNoContent(`${BASE_API_URL}/user/${id}`, { |
|
|
|
method: "DELETE", |
|
|
|
headers: { "Content-Type": "application/json" }, |
|
|
|
}); |
|
|
|
|