Taichi Masuyama hace 3 años
padre
commit
2736d92a62
Se han modificado 1 ficheros con 3 adiciones y 14 borrados
  1. 3 14
      packages/app/src/server/service/import.js

+ 3 - 14
packages/app/src/server/service/import.js

@@ -173,19 +173,6 @@ class ImportService {
     };
   }
 
-  /**
-   * Run pageService.normalizeAllPublicPages when page normalization is required
-   *
-   * @param {string} collections MongoDB collection name
-   * @param {boolean} isV5Compatible Whether pages are v5 compatible
-   * @param {boolean} isImportPagesCollection Whether importing pages collection
-   */
-  async _normalizeAllPublicPagesAfterImport(collections, isV5Compatible, isImportPagesCollection) {
-    const shouldNormalizePages = isV5Compatible && isImportPagesCollection;
-
-    if (shouldNormalizePages) await this.crowi.pageService.normalizeAllPublicPages();
-  }
-
   /**
    * import collections from json
    *
@@ -220,7 +207,9 @@ class ImportService {
 
     const currentIsV5Compatible = this.crowi.configManager.getConfig('crowi', 'app:isV5Compatible');
     const isImportPagesCollection = collections.includes('pages');
-    await this._normalizeAllPublicPagesAfterImport(collections, currentIsV5Compatible, isImportPagesCollection);
+    const shouldNormalizePages = currentIsV5Compatible && isImportPagesCollection;
+
+    if (shouldNormalizePages) await this.crowi.pageService.normalizeAllPublicPages();
   }
 
   /**