2017-01-04 13:59:23 -06:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
const checkErrors = require('../utils').checkErrors
|
|
|
|
const logger = require('../../../helpers/logger')
|
|
|
|
|
|
|
|
const validatorsRemoteVideos = {
|
2017-02-21 14:35:59 -06:00
|
|
|
remoteVideos,
|
2017-02-26 11:57:33 -06:00
|
|
|
remoteQaduVideos,
|
|
|
|
remoteEventsVideos
|
2017-01-04 13:59:23 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
function remoteVideos (req, res, next) {
|
|
|
|
req.checkBody('data').isEachRemoteRequestVideosValid()
|
|
|
|
|
|
|
|
logger.debug('Checking remoteVideos parameters', { parameters: req.body })
|
|
|
|
|
|
|
|
checkErrors(req, res, next)
|
|
|
|
}
|
|
|
|
|
2017-02-21 14:35:59 -06:00
|
|
|
function remoteQaduVideos (req, res, next) {
|
|
|
|
req.checkBody('data').isEachRemoteRequestVideosQaduValid()
|
|
|
|
|
2017-02-26 11:57:33 -06:00
|
|
|
logger.debug('Checking remoteQaduVideos parameters', { parameters: req.body })
|
2017-02-21 14:35:59 -06:00
|
|
|
|
|
|
|
checkErrors(req, res, next)
|
|
|
|
}
|
|
|
|
|
2017-02-26 11:57:33 -06:00
|
|
|
function remoteEventsVideos (req, res, next) {
|
|
|
|
req.checkBody('data').isEachRemoteRequestVideosEventsValid()
|
|
|
|
|
|
|
|
logger.debug('Checking remoteEventsVideos parameters', { parameters: req.body })
|
|
|
|
|
|
|
|
checkErrors(req, res, next)
|
|
|
|
}
|
2017-01-04 13:59:23 -06:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
module.exports = validatorsRemoteVideos
|