From fc51fde048f2c3ce1dd3e85f5528335040bae894 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 1 Jul 2016 16:16:40 +0200 Subject: reqValidators --> validators --- server/middlewares/reqValidators/pagination.js | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 server/middlewares/reqValidators/pagination.js (limited to 'server/middlewares/reqValidators/pagination.js') diff --git a/server/middlewares/reqValidators/pagination.js b/server/middlewares/reqValidators/pagination.js deleted file mode 100644 index e598f269a..000000000 --- a/server/middlewares/reqValidators/pagination.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict' - -const checkErrors = require('./utils').checkErrors -const logger = require('../../helpers/logger') - -const reqValidatorsPagination = { - pagination: pagination -} - -function pagination (req, res, next) { - req.checkQuery('start', 'Should have a number start').optional().isInt() - req.checkQuery('count', 'Should have a number count').optional().isInt() - - logger.debug('Checking pagination parameters', { parameters: req.query }) - - checkErrors(req, res, next) -} - -// --------------------------------------------------------------------------- - -module.exports = reqValidatorsPagination -- cgit v1.2.3