feat : update user

This commit is contained in:
lukman
2024-08-30 17:18:05 +08:00
parent 190949cb2b
commit 61df9959c1
8 changed files with 258 additions and 199 deletions

View File

@@ -52,13 +52,10 @@ export const funEditStatusMember = async (path: string, data: IStatusmember) =>
}
export const funEditMember = async (path: string, data: IEditDataMember) => {
export const funEditMember = async (path: string, data: FormData) => {
const response = await fetch(`/api/user/${path}`, {
method: "PUT",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(data),
body: data,
});
return await response.json().catch(() => null);
}