aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-02-26 18:57:33 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-02-26 20:01:26 +0100
commite4c87ec26962e359d1c70b03ed188a3f19d6a25b (patch)
tree26fe20e6f600bc6f6f569dde2171b0a2346b135c /server/middlewares
parent9e167724f7e933f41d9ea2e1c31772bf4c560a28 (diff)
downloadPeerTube-e4c87ec26962e359d1c70b03ed188a3f19d6a25b.tar.gz
PeerTube-e4c87ec26962e359d1c70b03ed188a3f19d6a25b.tar.zst
PeerTube-e4c87ec26962e359d1c70b03ed188a3f19d6a25b.zip
Server: implement video views
Diffstat (limited to 'server/middlewares')
-rw-r--r--server/middlewares/validators/remote/videos.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/server/middlewares/validators/remote/videos.js b/server/middlewares/validators/remote/videos.js
index ddc274c45..f2c6cba5e 100644
--- a/server/middlewares/validators/remote/videos.js
+++ b/server/middlewares/validators/remote/videos.js
@@ -5,7 +5,8 @@ const logger = require('../../../helpers/logger')
5 5
6const validatorsRemoteVideos = { 6const validatorsRemoteVideos = {
7 remoteVideos, 7 remoteVideos,
8 remoteQaduVideos 8 remoteQaduVideos,
9 remoteEventsVideos
9} 10}
10 11
11function remoteVideos (req, res, next) { 12function remoteVideos (req, res, next) {
@@ -19,11 +20,18 @@ function remoteVideos (req, res, next) {
19function remoteQaduVideos (req, res, next) { 20function remoteQaduVideos (req, res, next) {
20 req.checkBody('data').isEachRemoteRequestVideosQaduValid() 21 req.checkBody('data').isEachRemoteRequestVideosQaduValid()
21 22
22 logger.debug('Checking remoteVideosQadu parameters', { parameters: req.body }) 23 logger.debug('Checking remoteQaduVideos parameters', { parameters: req.body })
23 24
24 checkErrors(req, res, next) 25 checkErrors(req, res, next)
25} 26}
26 27
28function remoteEventsVideos (req, res, next) {
29 req.checkBody('data').isEachRemoteRequestVideosEventsValid()
30
31 logger.debug('Checking remoteEventsVideos parameters', { parameters: req.body })
32
33 checkErrors(req, res, next)
34}
27// --------------------------------------------------------------------------- 35// ---------------------------------------------------------------------------
28 36
29module.exports = validatorsRemoteVideos 37module.exports = validatorsRemoteVideos