zamis 5 سال پیش
والد
کامیت
58bfa0536e
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/server/service/file-uploader/gridfs.js

+ 2 - 2
src/server/service/file-uploader/gridfs.js

@@ -47,8 +47,8 @@ module.exports = function(crowi) {
     const filenameValues = attachments.map((attachment) => {
     const filenameValues = attachments.map((attachment) => {
       return attachment.fileName;
       return attachment.fileName;
     });
     });
-    const idsRelatedFiles = await AttachmentFile.find({ filename: { $in: filenameValues } }, { _id: 1 }).map((responses) => {
-      return responses.map((response) => { return response._id });
+    const idsRelatedFiles = await AttachmentFile.find({ filename: { $in: filenameValues } }, { _id: 1 }).map((fileIdObjects) => {
+      return fileIdObjects.map((obj) => { return obj._id });
     });
     });
 
 
     await AttachmentFile.deleteMany({ filename: { $in: filenameValues } });
     await AttachmentFile.deleteMany({ filename: { $in: filenameValues } });