diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-27 16:11:53 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-27 16:11:53 +0100 |
commit | 4635f59d7c3fea4b97029f10886c62fdf38b2084 (patch) | |
tree | d97357a00042bbfb33c4177ee24c01171d28dfce /server/middlewares/validators/pagination.ts | |
parent | ea44f375f5d3da06ca0aebfe871b9f924a26ec29 (diff) | |
download | PeerTube-4635f59d7c3fea4b97029f10886c62fdf38b2084.tar.gz PeerTube-4635f59d7c3fea4b97029f10886c62fdf38b2084.tar.zst PeerTube-4635f59d7c3fea4b97029f10886c62fdf38b2084.zip |
Add video comment components
Diffstat (limited to 'server/middlewares/validators/pagination.ts')
-rw-r--r-- | server/middlewares/validators/pagination.ts | 4 |
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' | |||
4 | import { areValidationErrors } from './utils' | 4 | import { areValidationErrors } from './utils' |
5 | 5 | ||
6 | const paginationValidator = [ | 6 | const 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 }) |