diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-02-26 18:57:33 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-02-26 20:01:26 +0100 |
commit | e4c87ec26962e359d1c70b03ed188a3f19d6a25b (patch) | |
tree | 26fe20e6f600bc6f6f569dde2171b0a2346b135c /server/middlewares/validators/remote | |
parent | 9e167724f7e933f41d9ea2e1c31772bf4c560a28 (diff) | |
download | PeerTube-e4c87ec26962e359d1c70b03ed188a3f19d6a25b.tar.gz PeerTube-e4c87ec26962e359d1c70b03ed188a3f19d6a25b.tar.zst PeerTube-e4c87ec26962e359d1c70b03ed188a3f19d6a25b.zip |
Server: implement video views
Diffstat (limited to 'server/middlewares/validators/remote')
-rw-r--r-- | server/middlewares/validators/remote/videos.js | 12 |
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 | ||
6 | const validatorsRemoteVideos = { | 6 | const validatorsRemoteVideos = { |
7 | remoteVideos, | 7 | remoteVideos, |
8 | remoteQaduVideos | 8 | remoteQaduVideos, |
9 | remoteEventsVideos | ||
9 | } | 10 | } |
10 | 11 | ||
11 | function remoteVideos (req, res, next) { | 12 | function remoteVideos (req, res, next) { |
@@ -19,11 +20,18 @@ function remoteVideos (req, res, next) { | |||
19 | function remoteQaduVideos (req, res, next) { | 20 | function 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 | ||
28 | function 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 | ||
29 | module.exports = validatorsRemoteVideos | 37 | module.exports = validatorsRemoteVideos |