From 93c3cf81218753096b5fd3c8419123647edfe5e6 Mon Sep 17 00:00:00 2001 From: abhinav-grd Date: Mon, 20 Sep 2021 17:07:08 +0530 Subject: [PATCH] update moveToCollection API --- src/services/collectionService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/collectionService.ts b/src/services/collectionService.ts index 5f1787e24..f636981db 100644 --- a/src/services/collectionService.ts +++ b/src/services/collectionService.ts @@ -383,7 +383,7 @@ export const addToCollection = async ( } }; export const moveToCollection = async ( - oldCollection: Collection, + oldCollectionID: number, newCollection: Collection, files: File[] ) => { @@ -392,12 +392,12 @@ export const moveToCollection = async ( await encryptWithNewCollectionKey(newCollection, files); const requestBody: MoveToCollectionRequest = { - fromCollectionID: oldCollection.id, + fromCollectionID: oldCollectionID, toCollectionID: newCollection.id, files: fileKeysEncryptedWithNewCollection, }; await HTTPService.post( - `${ENDPOINT}/collections/add-files`, + `${ENDPOINT}/collections/move-files`, requestBody, null, {