Explorar o código

delete comment

zamis %!s(int64=5) %!d(string=hai) anos
pai
achega
ae04b5ca02
Modificáronse 1 ficheiros con 0 adicións e 10 borrados
  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) {