: task divisi

Deskripsi:
- update task detail divisi

No Issues
This commit is contained in:
amel
2024-09-02 13:37:32 +08:00
parent d8d0911afa
commit 0d389e417d
6 changed files with 400 additions and 6 deletions

View File

@@ -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);
};