aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-02-21 21:35:59 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-02-26 20:01:26 +0100
commit9e167724f7e933f41d9ea2e1c31772bf4c560a28 (patch)
tree093cb7c1b088f35aaf847f859a313a121c8cd233 /server/middlewares
parent0150b17e51df3e9fad8a59133d828c68f8ba672b (diff)
downloadPeerTube-9e167724f7e933f41d9ea2e1c31772bf4c560a28.tar.gz
PeerTube-9e167724f7e933f41d9ea2e1c31772bf4c560a28.tar.zst
PeerTube-9e167724f7e933f41d9ea2e1c31772bf4c560a28.zip
Server: make a basic "quick and dirty update" for videos
This system will be useful to to update some int video attributes (likes, dislikes, views...) The classic system is not used because we need some optimization for scaling
Diffstat (limited to 'server/middlewares')
-rw-r--r--server/middlewares/validators/remote/videos.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/server/middlewares/validators/remote/videos.js b/server/middlewares/validators/remote/videos.js
index cf9925b6c..ddc274c45 100644
--- a/server/middlewares/validators/remote/videos.js
+++ b/server/middlewares/validators/remote/videos.js
@@ -4,7 +4,8 @@ const checkErrors = require('../utils').checkErrors
4const logger = require('../../../helpers/logger') 4const logger = require('../../../helpers/logger')
5 5
6const validatorsRemoteVideos = { 6const validatorsRemoteVideos = {
7 remoteVideos 7 remoteVideos,
8 remoteQaduVideos
8} 9}
9 10
10function remoteVideos (req, res, next) { 11function remoteVideos (req, res, next) {
@@ -15,6 +16,14 @@ function remoteVideos (req, res, next) {
15 checkErrors(req, res, next) 16 checkErrors(req, res, next)
16} 17}
17 18
19function remoteQaduVideos (req, res, next) {
20 req.checkBody('data').isEachRemoteRequestVideosQaduValid()
21
22 logger.debug('Checking remoteVideosQadu parameters', { parameters: req.body })
23
24 checkErrors(req, res, next)
25}
26
18// --------------------------------------------------------------------------- 27// ---------------------------------------------------------------------------
19 28
20module.exports = validatorsRemoteVideos 29module.exports = validatorsRemoteVideos