aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/reqValidators/pagination.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-17 21:03:00 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-17 21:03:00 +0200
commita877d5acc5c52b8667c65f725bbca9a52e40ec48 (patch)
tree20b5dd56f71c7572360807f894e85e0ab729629f /server/middlewares/reqValidators/pagination.js
parent479f229198bdfcfd3a63d02babdddaa8b2209ccb (diff)
downloadPeerTube-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.js6
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
10function pagination (req, res, next) { 10function 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}