aboutsummaryrefslogtreecommitdiffhomepage
path: root/middlewares
diff options
context:
space:
mode:
Diffstat (limited to 'middlewares')
-rw-r--r--middlewares/reqValidators/remote.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/middlewares/reqValidators/remote.js b/middlewares/reqValidators/remote.js
index e851b49a4..642dad1c7 100644
--- a/middlewares/reqValidators/remote.js
+++ b/middlewares/reqValidators/remote.js
@@ -18,10 +18,8 @@
18 } 18 }
19 19
20 remote.remoteVideosAdd = function (req, res, next) { 20 remote.remoteVideosAdd = function (req, res, next) {
21 req.checkBody('data.name', 'Should have a name').isLength(1, 50) 21 req.checkBody('data').isArray()
22 req.checkBody('data.description', 'Should have a description').isLength(1, 250) 22 req.checkBody('data').eachIsRemoteVideosAddValid()
23 req.checkBody('data.magnetUri', 'Should have a magnetUri').notEmpty()
24 req.checkBody('data.podUrl', 'Should have a podUrl').isURL()
25 23
26 logger.debug('Checking remoteVideosAdd parameters', { parameters: req.body }) 24 logger.debug('Checking remoteVideosAdd parameters', { parameters: req.body })
27 25
@@ -29,7 +27,8 @@
29 } 27 }
30 28
31 remote.remoteVideosRemove = function (req, res, next) { 29 remote.remoteVideosRemove = function (req, res, next) {
32 req.checkBody('data.magnetUri', 'Should have a magnetUri').notEmpty() 30 req.checkBody('data').isArray()
31 req.checkBody('data').eachIsRemoteVideosRemoveValid()
33 32
34 logger.debug('Checking remoteVideosRemove parameters', { parameters: req.body }) 33 logger.debug('Checking remoteVideosRemove parameters', { parameters: req.body })
35 34