|
|
@@ -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;
|
|
|
}
|
|
|
|