@@ -26,7 +26,7 @@ module.exports = (crowi) => {
const validator = {
retrieveAttachments: [
query('pageId').isMongoId().withMessage('pageId is required'),
- query('limit').if(value => value != null).isInt({ max: 100 }),
+ query('limit').if(value => value != null).isInt({ max: 100 }).withMessage('You should set less than 100 or not to set limit.'),
],
};
/**
@@ -145,7 +145,7 @@ module.exports = (crowi) => {
*/
validator.myBookmarkList = [
query('page').isInt({ min: 1 }),
];
router.get('/:userId', accessTokenParser, loginRequired, validator.myBookmarkList, apiV3FormValidator, async(req, res) => {
@@ -87,7 +87,7 @@ module.exports = (crowi) => {
});
validator.displayList = [
router.get('/list', accessTokenParser, loginRequired, validator.displayList, apiV3FormValidator, async(req, res) => {
@@ -70,7 +70,7 @@ module.exports = (crowi) => {
retrieveRevisions: [
query('page').isInt({ min: 0 }).withMessage('page must be int'),
retrieveRevisionById: [
@@ -106,7 +106,7 @@ module.exports = (crowi) => {
validator.recentCreatedByUser = [