upd: task file

Deskripsi:
- hapus file task divisi

No Issues
This commit is contained in:
amel
2024-09-02 11:20:42 +08:00
parent c45a55628d
commit d8d0911afa
4 changed files with 158 additions and 6 deletions

View File

@@ -119,4 +119,14 @@ export const funEditTask = async (path: string, data: { title: string }) => {
body: JSON.stringify(data),
});
return await response.json().catch(() => null);
};
export const funDeleteFileTask = async (path: string) => {
const response = await fetch(`/api/task/file/${path}`, {
method: "DELETE",
headers: {
"Content-Type": "application/json",
},
});
return await response.json().catch(() => null);
};