diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-05-17 21:03:00 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-05-17 21:03:00 +0200 |
commit | a877d5acc5c52b8667c65f725bbca9a52e40ec48 (patch) | |
tree | 20b5dd56f71c7572360807f894e85e0ab729629f /server/middlewares/reqValidators/pagination.js | |
parent | 479f229198bdfcfd3a63d02babdddaa8b2209ccb (diff) | |
download | PeerTube-a877d5acc5c52b8667c65f725bbca9a52e40ec48.tar.gz PeerTube-a877d5acc5c52b8667c65f725bbca9a52e40ec48.tar.zst PeerTube-a877d5acc5c52b8667c65f725bbca9a52e40ec48.zip |
Add ability to sort videos list
Diffstat (limited to 'server/middlewares/reqValidators/pagination.js')
-rw-r--r-- | server/middlewares/reqValidators/pagination.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/middlewares/reqValidators/pagination.js b/server/middlewares/reqValidators/pagination.js index ca8375396..e598f269a 100644 --- a/server/middlewares/reqValidators/pagination.js +++ b/server/middlewares/reqValidators/pagination.js | |||
@@ -8,10 +8,10 @@ const reqValidatorsPagination = { | |||
8 | } | 8 | } |
9 | 9 | ||
10 | function pagination (req, res, next) { | 10 | function pagination (req, res, next) { |
11 | req.checkParams('start', 'Should have a number start').optional().isInt() | 11 | req.checkQuery('start', 'Should have a number start').optional().isInt() |
12 | req.checkParams('count', 'Should have a number count').optional().isInt() | 12 | req.checkQuery('count', 'Should have a number count').optional().isInt() |
13 | 13 | ||
14 | logger.debug('Checking pagination parameters', { parameters: req.params }) | 14 | logger.debug('Checking pagination parameters', { parameters: req.query }) |
15 | 15 | ||
16 | checkErrors(req, res, next) | 16 | checkErrors(req, res, next) |
17 | } | 17 | } |