🐛 Fix permanent trash delete (#629)

This commit is contained in:
Montassar Ghanmy
2024-07-24 16:01:42 +01:00
committed by GitHub
parent 123e6212fb
commit 9b99f3f354
2 changed files with 7 additions and 6 deletions
@@ -111,9 +111,11 @@ export const useDriveActions = () => {
);
const remove = useCallback(
async (id: string, parentId: string) => {
async (id: string | string[], parentId: string) => {
try {
await DriveApiClient.remove(companyId, id);
if (Array.isArray(id)) {
await Promise.all(id.map(i => DriveApiClient.remove(companyId, i)));
} else await DriveApiClient.remove(companyId, id);
await refresh(parentId || '', true);
await getQuota();
} catch (e) {