zamis 5 лет назад
Родитель
Сommit
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;
   }