aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/remote/videos.ts
blob: 3380c29e27850a5785bc87075fd72e06a50512b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { logger } from '../../../helpers'
import { checkErrors } from '../utils'

function remoteVideosValidator (req, res, next) {
  req.checkBody('data').isEachRemoteRequestVideosValid()

  logger.debug('Checking remoteVideos parameters', { parameters: req.body })

  checkErrors(req, res, next)
}

function remoteQaduVideosValidator (req, res, next) {
  req.checkBody('data').isEachRemoteRequestVideosQaduValid()

  logger.debug('Checking remoteQaduVideos parameters', { parameters: req.body })

  checkErrors(req, res, next)
}

function remoteEventsVideosValidator (req, res, next) {
  req.checkBody('data').isEachRemoteRequestVideosEventsValid()

  logger.debug('Checking remoteEventsVideos parameters', { parameters: req.body })

  checkErrors(req, res, next)
}

// ---------------------------------------------------------------------------

export {
  remoteVideosValidator,
  remoteQaduVideosValidator,
  remoteEventsVideosValidator
}