Просмотр исходного кода

Merge pull request #22 from hakumizuki/feat/improve-g2g-ignored-collection-names

feat: improve g2g ignored collections names
atsuki-t 3 лет назад
Родитель
Сommit
70a600fedc
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      packages/app/src/components/Admin/G2GDataTransfer.tsx

+ 3 - 3
packages/app/src/components/Admin/G2GDataTransfer.tsx

@@ -15,7 +15,7 @@ import CustomCopyToClipBoard from '../Common/CustomCopyToClipBoard';
 import G2GDataTransferExportForm from './G2GDataTransferExportForm';
 
 const IGNORED_COLLECTION_NAMES = [
-  'sessions', 'rlflx', 'activities',
+  'sessions', 'rlflx', 'activities', 'attachmentFiles.files', 'attachmentFiles.chunks',
 ];
 
 const G2GDataTransfer = (): JSX.Element => {
@@ -98,14 +98,14 @@ const G2GDataTransfer = (): JSX.Element => {
     try {
       await customAxios.post('/_api/v3/g2g-transfer/transfer', {
         transferKey: startTransferKey,
-        collections,
+        collections: selectedCollections,
         optionsMap,
       });
     }
     catch (errs) {
       toastError('Failed to transfer');
     }
-  }, [startTransferKey, collections, optionsMap]);
+  }, [startTransferKey, selectedCollections, optionsMap]);
 
   useEffect(() => {
     setCollectionsAndSelectedCollections();