mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
reqValidators --> validators
This commit is contained in:
parent
69b0a27cbb
commit
fc51fde048
13 changed files with 54 additions and 53 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue