added restore logic and fixed delete and added multi delete

This commit is contained in:
subnub
2024-06-30 13:17:04 -04:00
parent e3970ad394
commit 9f1ab10f40
25 changed files with 633 additions and 278 deletions
+9 -2
View File
@@ -56,8 +56,15 @@ export const renameFolder = async (folderID: string, name: string) => {
return response.data;
};
export const trashFolderAPI = (folderID: string) => {
const response = axios.patch("/folder-service/trash", {
export const trashFolderAPI = async (folderID: string) => {
const response = await axios.patch("/folder-service/trash", {
id: folderID,
});
return response.data;
};
export const restoreFolderAPI = async (folderID: string) => {
const response = await axios.patch("/folder-service/restore", {
id: folderID,
});
return response.data;