Futa Arai 2 лет назад
Родитель
Сommit
64a449e14f
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      apps/app/src/features/page-bulk-export/server/service/page-bulk-export.ts

+ 4 - 4
apps/app/src/features/page-bulk-export/server/service/page-bulk-export.ts

@@ -37,7 +37,7 @@ class PageBulkExportService {
     const timeStamp = (new Date()).getTime();
     const timeStamp = (new Date()).getTime();
     const uploadKey = `page-bulk-export-${timeStamp}.zip`;
     const uploadKey = `page-bulk-export-${timeStamp}.zip`;
 
 
-    const pageReadableStream = this.getPageReadableStream(basePagePath);
+    const pageReadable = this.getPageReadable(basePagePath);
     const zipArchiver = this.setUpZipArchiver();
     const zipArchiver = this.setUpZipArchiver();
     const pagesWritable = this.getPageWritable(zipArchiver);
     const pagesWritable = this.getPageWritable(zipArchiver);
 
 
@@ -57,7 +57,7 @@ class PageBulkExportService {
 
 
     // Cannot directly pipe from pagesWritable to zipArchiver due to how the 'append' method works.
     // Cannot directly pipe from pagesWritable to zipArchiver due to how the 'append' method works.
     // Hence, execution of two pipelines is required.
     // Hence, execution of two pipelines is required.
-    pipeline(pageReadableStream, pagesWritable, err => this.handleExportError(err, multipartUploader));
+    pipeline(pageReadable, pagesWritable, err => this.handleExportError(err, multipartUploader));
     pipeline(zipArchiver, multipartUploadWritable, err => this.handleExportError(err, multipartUploader));
     pipeline(zipArchiver, multipartUploadWritable, err => this.handleExportError(err, multipartUploader));
   }
   }
 
 
@@ -72,9 +72,9 @@ class PageBulkExportService {
   }
   }
 
 
   /**
   /**
-   * Get a ReadableStream of all the pages under the specified path, including the root page.
+   * Get a Readable of all the pages under the specified path, including the root page.
    */
    */
-  private getPageReadableStream(basePagePath: string): Readable {
+  private getPageReadable(basePagePath: string): Readable {
     const Page = mongoose.model<IPage, PageModel>('Page');
     const Page = mongoose.model<IPage, PageModel>('Page');
     const { PageQueryBuilder } = Page;
     const { PageQueryBuilder } = Page;