Browse Source

add validator

itizawa 5 years ago
parent
commit
f0b17dd8c0
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/server/routes/apiv3/revisions.js

+ 1 - 0
src/server/routes/apiv3/revisions.js

@@ -31,6 +31,7 @@ module.exports = (crowi) => {
   const validator = {
     retrieveRevisions: [
       query('pageId').isMongoId().withMessage('pageId is required'),
+      query('selectedPage').isInt({ min: 0 }).withMessage('selectedPage must be int'),
     ],
     retrieveRevisionById: [
       query('pageId').isMongoId().withMessage('pageId is required'),