1 import 'express-validator'
2 import * as express from 'express'
4 import { logger } from '../../../helpers'
5 import { checkErrors } from '../utils'
7 function remoteVideosValidator (req: express.Request, res: express.Response, next: express.NextFunction) {
8 req.checkBody('data').isEachRemoteRequestVideosValid()
10 logger.debug('Checking remoteVideos parameters', { parameters: req.body })
12 checkErrors(req, res, next)
15 function remoteQaduVideosValidator (req: express.Request, res: express.Response, next: express.NextFunction) {
16 req.checkBody('data').isEachRemoteRequestVideosQaduValid()
18 logger.debug('Checking remoteQaduVideos parameters', { parameters: req.body })
20 checkErrors(req, res, next)
23 function remoteEventsVideosValidator (req: express.Request, res: express.Response, next: express.NextFunction) {
24 req.checkBody('data').isEachRemoteRequestVideosEventsValid()
26 logger.debug('Checking remoteEventsVideos parameters', { parameters: req.body })
28 checkErrors(req, res, next)
31 // ---------------------------------------------------------------------------
34 remoteVideosValidator,
35 remoteQaduVideosValidator,
36 remoteEventsVideosValidator