Shun Miyazawa пре 4 година
родитељ
комит
08f020d801
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      packages/app/src/server/routes/apiv3/attachment.js

+ 1 - 0
packages/app/src/server/routes/apiv3/attachment.js

@@ -28,6 +28,7 @@ module.exports = (crowi) => {
   const validator = {
   const validator = {
     retrieveAttachments: [
     retrieveAttachments: [
       query('pageId').isMongoId().withMessage('pageId is required'),
       query('pageId').isMongoId().withMessage('pageId is required'),
+      query('page').isInt({ min: 1 }).withMessage('page is required and must be set to a number greater than 1'),
       query('limit').if(value => value != null).isInt({ max: 100 }).withMessage('You should set less than 100 or not to set limit.'),
       query('limit').if(value => value != null).isInt({ max: 100 }).withMessage('You should set less than 100 or not to set limit.'),
     ],
     ],
   };
   };