Add radix to parseInt

pull/10/head
Chocobozzz 2016-05-19 20:27:36 +02:00
parent 0cd30cff9e
commit 13c14a9028
1 changed files with 2 additions and 2 deletions

View File

@ -8,9 +8,9 @@ const paginationMiddleware = {
function setPagination (req, res, next) { function setPagination (req, res, next) {
if (!req.query.start) req.query.start = 0 if (!req.query.start) req.query.start = 0
else req.query.start = parseInt(req.query.start) else req.query.start = parseInt(req.query.start, 10)
if (!req.query.count) req.query.count = constants.PAGINATION_COUNT_DEFAULT if (!req.query.count) req.query.count = constants.PAGINATION_COUNT_DEFAULT
else req.query.count = parseInt(req.query.count) else req.query.count = parseInt(req.query.count, 10)
return next() return next()
} }