aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares')
-rw-r--r--server/middlewares/validators/pagination.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/pagination.ts b/server/middlewares/validators/pagination.ts
index 0895b4eb8..25debfa6e 100644
--- a/server/middlewares/validators/pagination.ts
+++ b/server/middlewares/validators/pagination.ts
@@ -4,8 +4,8 @@ import { logger } from '../../helpers'
4import { areValidationErrors } from './utils' 4import { areValidationErrors } from './utils'
5 5
6const paginationValidator = [ 6const paginationValidator = [
7 query('start').optional().isInt().withMessage('Should have a number start'), 7 query('start').optional().isInt({ min: 0 }).withMessage('Should have a number start'),
8 query('count').optional().isInt().withMessage('Should have a number count'), 8 query('count').optional().isInt({ min: 0 }).withMessage('Should have a number count'),
9 9
10 (req: express.Request, res: express.Response, next: express.NextFunction) => { 10 (req: express.Request, res: express.Response, next: express.NextFunction) => {
11 logger.debug('Checking pagination parameters', { parameters: req.query }) 11 logger.debug('Checking pagination parameters', { parameters: req.query })