diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-05-19 20:27:36 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-05-19 20:27:36 +0200 |
commit | 13c14a902816f6e8d663ccb6af0d82662ed85ed1 (patch) | |
tree | ce4cc642c3d36bbdbd49b33e15066f7e51763bfe | |
parent | 0cd30cff9e4f224678a47cae22b9b45597b1a7e3 (diff) | |
download | PeerTube-13c14a902816f6e8d663ccb6af0d82662ed85ed1.tar.gz PeerTube-13c14a902816f6e8d663ccb6af0d82662ed85ed1.tar.zst PeerTube-13c14a902816f6e8d663ccb6af0d82662ed85ed1.zip |
Add radix to parseInt
-rw-r--r-- | server/middlewares/pagination.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/pagination.js b/server/middlewares/pagination.js index 9fa43f008..a571e51f6 100644 --- a/server/middlewares/pagination.js +++ b/server/middlewares/pagination.js | |||
@@ -8,9 +8,9 @@ const paginationMiddleware = { | |||
8 | 8 | ||
9 | function setPagination (req, res, next) { | 9 | function setPagination (req, res, next) { |
10 | if (!req.query.start) req.query.start = 0 | 10 | if (!req.query.start) req.query.start = 0 |
11 | else req.query.start = parseInt(req.query.start) | 11 | else req.query.start = parseInt(req.query.start, 10) |
12 | if (!req.query.count) req.query.count = constants.PAGINATION_COUNT_DEFAULT | 12 | if (!req.query.count) req.query.count = constants.PAGINATION_COUNT_DEFAULT |
13 | else req.query.count = parseInt(req.query.count) | 13 | else req.query.count = parseInt(req.query.count, 10) |
14 | 14 | ||
15 | return next() | 15 | return next() |
16 | } | 16 | } |