blob: 16682696e5a49cafc9e00c0a74a9c9eea0fdc45b (
plain) (
tree)
|
|
'use strict'
const checkErrors = require('./utils').checkErrors
const logger = require('../../helpers/logger')
const validatorsPagination = {
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 = validatorsPagination
|