aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-27 16:11:53 +0100
committerChocobozzz <me@florianbigard.com>2017-12-27 16:11:53 +0100
commit4635f59d7c3fea4b97029f10886c62fdf38b2084 (patch)
treed97357a00042bbfb33c4177ee24c01171d28dfce /server/middlewares/validators
parentea44f375f5d3da06ca0aebfe871b9f924a26ec29 (diff)
downloadPeerTube-4635f59d7c3fea4b97029f10886c62fdf38b2084.tar.gz
PeerTube-4635f59d7c3fea4b97029f10886c62fdf38b2084.tar.zst
PeerTube-4635f59d7c3fea4b97029f10886c62fdf38b2084.zip
Add video comment components
Diffstat (limited to 'server/middlewares/validators')
-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 })