added restore logic and fixed delete and added multi delete
This commit is contained in:
@@ -113,6 +113,20 @@ export const trashMultiAPI = async (items: any) => {
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const restoreFileAPI = async (fileID: string) => {
|
||||
const response = await axios.patch(`/file-service/restore`, {
|
||||
id: fileID,
|
||||
});
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const restoreMultiAPI = async (items: any) => {
|
||||
const response = await axios.patch(`/file-service/restore-multi`, {
|
||||
items,
|
||||
});
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const renameFileAPI = async (fileID: string, name: string) => {
|
||||
const response = await axios.patch(`/file-service/rename`, {
|
||||
id: fileID,
|
||||
@@ -130,3 +144,12 @@ export const deleteFileAPI = async (fileID: string) => {
|
||||
});
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const deleteMultiAPI = async (items: any) => {
|
||||
const response = await axios.delete(`/file-service/remove-multi`, {
|
||||
data: {
|
||||
items,
|
||||
},
|
||||
});
|
||||
return response.data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user