upd
: task divisi Deskripsi: - update task detail divisi No Issues
This commit is contained in:
@@ -7,7 +7,6 @@ export const funGetAllTask = async (path?: string) => {
|
||||
|
||||
|
||||
export const funCreateTask = async (data: FormData) => {
|
||||
|
||||
const response = await fetch("/api/task", {
|
||||
method: "POST",
|
||||
body: data,
|
||||
@@ -129,4 +128,20 @@ export const funDeleteFileTask = async (path: string) => {
|
||||
},
|
||||
});
|
||||
return await response.json().catch(() => null);
|
||||
};
|
||||
|
||||
export const funCekNamFileUploadTask = async (path: string, data: FormData) => {
|
||||
const response = await fetch(`/api/task/file/${path}`, {
|
||||
method: "PUT",
|
||||
body: data,
|
||||
});
|
||||
return await response.json().catch(() => null);
|
||||
};
|
||||
|
||||
export const funAddFileTask = async (path: string, data: FormData) => {
|
||||
const response = await fetch(`/api/task/file/${path}`, {
|
||||
method: "POST",
|
||||
body: data,
|
||||
});
|
||||
return await response.json().catch(() => null);
|
||||
};
|
||||
Reference in New Issue
Block a user