فهرست منبع

Revert "fix"

This reverts commit e0bf4d6479f7c1bbe947929d9e299f0402b4a902.
yusuketk 5 سال پیش
والد
کامیت
8a33cf7c2a
1فایلهای تغییر یافته به همراه1 افزوده شده و 4 حذف شده
  1. 1 4
      src/server/routes/attachment.js

+ 1 - 4
src/server/routes/attachment.js

@@ -129,7 +129,7 @@ module.exports = function(crowi, app) {
   const Attachment = crowi.model('Attachment');
   const Attachment = crowi.model('Attachment');
   const Page = crowi.model('Page');
   const Page = crowi.model('Page');
   const GlobalNotificationSetting = crowi.model('GlobalNotificationSetting');
   const GlobalNotificationSetting = crowi.model('GlobalNotificationSetting');
-  const { attachmentService, globalNotificationService } = crowi;
+  const { fileUploadService, attachmentService, globalNotificationService } = crowi;
 
 
   /**
   /**
    * Check the user is accessible to the related page
    * Check the user is accessible to the related page
@@ -176,8 +176,6 @@ module.exports = function(crowi, app) {
    * @param {boolean} forceDownload
    * @param {boolean} forceDownload
    */
    */
   async function responseForAttachment(req, res, attachment, forceDownload) {
   async function responseForAttachment(req, res, attachment, forceDownload) {
-    const { fileUploadService } = crowi;
-
     if (attachment == null) {
     if (attachment == null) {
       return res.json(ApiResponse.error('attachment not found'));
       return res.json(ApiResponse.error('attachment not found'));
     }
     }
@@ -343,7 +341,6 @@ module.exports = function(crowi, app) {
    * @apiGroup Attachment
    * @apiGroup Attachment
    */
    */
   api.limit = async function(req, res) {
   api.limit = async function(req, res) {
-    const { fileUploadService } = crowi;
     const fileSize = Number(req.query.fileSize);
     const fileSize = Number(req.query.fileSize);
     return res.json(ApiResponse.success(await fileUploadService.checkLimit(fileSize)));
     return res.json(ApiResponse.success(await fileUploadService.checkLimit(fileSize)));
   };
   };