zamis 5 лет назад
Родитель
Сommit
54d3d40137
1 измененных файлов с 7 добавлено и 7 удалено
  1. 7 7
      src/server/service/page.js

+ 7 - 7
src/server/service/page.js

@@ -38,15 +38,15 @@ class PageService {
     const Attachment = this.crowi.model('Attachment');
     const { attachmentService } = this.crowi;
 
-    const readable = new Readable({ objectMode: true });
+    // const readable = new Readable({ objectMode: true });
 
-    readable.push(pageIds);
-    readable.push(null);
+    // readable.push(pageIds);
+    // readable.push(null);
 
-    readable.on('data', async(chunk) => {
-      const attachments = await Attachment.find({ page: chunk });
-      attachmentService.removeAttachment(attachments);
-    });
+    // readable.on('data', async(chunk) => {
+    const attachments = await Attachment.find({ page: pageIds });
+    attachmentService.removeAttachment(attachments);
+    // });
     return;
   }