Browse Source

add query value

zahmis 5 years ago
parent
commit
3c41e12bf9
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/server/routes/apiv3/attachment.js

+ 3 - 1
src/server/routes/apiv3/attachment.js

@@ -25,7 +25,9 @@ module.exports = (crowi) => {
 
 
   const validator = {
   const validator = {
     retrieveAttachments: [
     retrieveAttachments: [
-      query,
+      query('pageId').isMongoId().withMessage('pageId is required'),
+      query('limit').isNumeric(),
+      query('offset').isNumeric(),
     ],
     ],
   };
   };
   /**
   /**