upd: project
Deskripsi: - tambah file pada project kegiatan -nb : blm selesai No Issues
This commit is contained in:
24
lib/api.ts
24
lib/api.ts
@@ -320,4 +320,28 @@ export const apiCreateProject = async (data: FormData) => {
|
||||
export const apiDeleteProject = async (data: { user: string }, id: string) => {
|
||||
const response = await api.delete(`/mobile/project/${id}/lainnya`, { data })
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const apiAddFileProject = async ({ data, id }: { data: FormData, id: string }) => {
|
||||
console.log('apiAddFileProject')
|
||||
const response = await api.post(`/mobile/project/file/${id}`, data,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
}
|
||||
)
|
||||
console.log(response)
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const apiCheckFileProject = async ({ data, id }: { data: FormData, id: string }) => {
|
||||
const response = await api.put(`/mobile/project/file/${id}`, data,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
}
|
||||
)
|
||||
return response.data;
|
||||
};
|
||||
Reference in New Issue
Block a user