瀏覽代碼

fix space

zamis 5 年之前
父節點
當前提交
c73f402ebc
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      src/server/service/attachment.js

+ 1 - 3
src/server/service/attachment.js

@@ -44,17 +44,15 @@ class AttachmentService {
   }
 
   async removeAttachment(attachments) {
-
     const { fileUploadService } = this.crowi;
     const attachmentsCollection = mongoose.connection.collection('attachments');
     const unorderAttachmentsBulkOp = attachmentsCollection.initializeUnorderedBulkOp();
+
     attachments.forEach((attachment) => {
       fileUploadService.deleteFiles(attachment);
       unorderAttachmentsBulkOp.find({ _id: attachment._id }).remove();
     });
-
     await unorderAttachmentsBulkOp.execute();
-
     return;
   }