From 13c14a902816f6e8d663ccb6af0d82662ed85ed1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 19 May 2016 20:27:36 +0200 Subject: [PATCH] Add radix to parseInt --- server/middlewares/pagination.js | 4 ++-- 1 file 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 = { function setPagination (req, res, next) { 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 - else req.query.count = parseInt(req.query.count) + else req.query.count = parseInt(req.query.count, 10) return next() } -- 2.25.1