3 const checkErrors = require('./utils').checkErrors
4 const logger = require('../../helpers/logger')
6 const validatorsRemote = {
11 function remoteVideos (req, res, next) {
12 req.checkBody('data').isEachRemoteVideosValid()
14 logger.debug('Checking remoteVideos parameters', { parameters: req.body })
16 checkErrors(req, res, next)
19 function signature (req, res, next) {
20 req.checkBody('signature.host', 'Should have a signature host').isURL()
21 req.checkBody('signature.signature', 'Should have a signature').notEmpty()
23 logger.debug('Checking signature parameters', { parameters: { signatureHost: req.body.signature.host } })
25 checkErrors(req, res, next)
28 // ---------------------------------------------------------------------------
30 module.exports = validatorsRemote