upd: profile
Deskripsi: - edit profile - api image - folder image user No Issues
This commit is contained in:
@@ -5,13 +5,10 @@ export const funGetProfileByCookies = async (path?: string) => {
|
||||
return await response.json().catch(() => null);
|
||||
}
|
||||
|
||||
export const funEditProfileByCookies = async ( data: IEditDataProfile) => {
|
||||
export const funEditProfileByCookies = async (data: FormData) => {
|
||||
const response = await fetch(`/api/user/profile/`, {
|
||||
method: "PUT",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(data),
|
||||
body: data,
|
||||
});
|
||||
return await response.json().catch(() => null);
|
||||
}
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
export interface IProfileById {
|
||||
id: string
|
||||
name: string
|
||||
email: string
|
||||
phone: string
|
||||
nik: string
|
||||
gender: string
|
||||
idGroup: string
|
||||
idPosition: string
|
||||
group: string
|
||||
position: string
|
||||
}
|
||||
|
||||
export interface IEditDataProfile {
|
||||
id: string;
|
||||
nik: string;
|
||||
name: string;
|
||||
phone: string;
|
||||
email: string;
|
||||
gender: string;
|
||||
}
|
||||
id: string
|
||||
name: string
|
||||
email: string
|
||||
phone: string
|
||||
nik: string
|
||||
gender: string
|
||||
idGroup: string
|
||||
idPosition: string
|
||||
group: string
|
||||
position: string
|
||||
}
|
||||
|
||||
export interface IEditDataProfile {
|
||||
id: string;
|
||||
nik: string;
|
||||
name: string;
|
||||
phone: string;
|
||||
email: string;
|
||||
gender: string;
|
||||
img: string;
|
||||
}
|
||||
Reference in New Issue
Block a user