upd: member
Deskripsi: - detail member - aktivasi member - edit member No Issues
This commit is contained in:
20
lib/api.ts
20
lib/api.ts
@@ -127,4 +127,22 @@ export const apiCreateUser = async (data: FormData) => {
|
||||
},
|
||||
})
|
||||
return response.data;
|
||||
};
|
||||
};
|
||||
|
||||
export const apiDeleteUser = async (data: { user: string, isActive: boolean }, id: string) => {
|
||||
await api.delete(`mobile/user/${id}`, { data }).then(response => {
|
||||
return response.data;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
};
|
||||
|
||||
export const apiEditUser = async (data: FormData, id: string) => {
|
||||
const response = await api.put(`/mobile/user/${id}`, data, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
})
|
||||
return response.data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user