3 const checkErrors = require('./utils').checkErrors
4 const logger = require('../../helpers/logger')
6 const validatorsPagination = {
10 function pagination (req, res, next) {
11 req.checkQuery('start', 'Should have a number start').optional().isInt()
12 req.checkQuery('count', 'Should have a number count').optional().isInt()
14 logger.debug('Checking pagination parameters', { parameters: req.query })
16 checkErrors(req, res, next)
19 // ---------------------------------------------------------------------------
21 module.exports = validatorsPagination