mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-10-31 05:28:24 +03:00
22 lines
599 B
JavaScript
22 lines
599 B
JavaScript
'use strict'
|
|
|
|
const checkErrors = require('./utils').checkErrors
|
|
const logger = require('../../helpers/logger')
|
|
|
|
const reqValidatorsPagination = {
|
|
pagination: pagination
|
|
}
|
|
|
|
function pagination (req, res, next) {
|
|
req.checkParams('start', 'Should have a number start').optional().isInt()
|
|
req.checkParams('count', 'Should have a number count').optional().isInt()
|
|
|
|
logger.debug('Checking pagination parameters', { parameters: req.params })
|
|
|
|
checkErrors(req, res, next)
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
module.exports = reqValidatorsPagination
|