ソースを参照

delete comment

zamis 5 年 前
コミット
ae04b5ca02
1 ファイル変更0 行追加10 行削除
  1. 0 10
      src/server/service/page.js

+ 0 - 10
src/server/service/page.js

@@ -32,8 +32,6 @@ class PageService {
       this.removeAllAttachments(pageIds),
     ]);
 
-    // const deleteAttachments = await this.removeAllAttachments(pageIds);
-
     return deleteData;
 
   }
@@ -41,17 +39,9 @@ class PageService {
   async removeAllAttachments(pageIds) {
     const Attachment = this.crowi.model('Attachment');
     const { attachmentService } = this.crowi;
-
     const attachments = await Attachment.find({ page: { $in: pageIds } });
 
     return attachmentService.removeAttachment(attachments);
-
-
-    // const promises = attachments.map(async(attachment) => {
-    //   return attachmentService.removeAttachment(attachment._id);
-    // });
-
-    // return Promise.all(promises);
   }
 
   async duplicate(page, newPagePath, user) {