diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-08-20 16:59:25 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-08-20 17:11:38 +0200 |
commit | 1e2564d3927ce4ca4ca9a09930da6da7ebb4e9a1 (patch) | |
tree | 1a2601d63152da4906335c6116ba5f1e8992af33 /server/middlewares/validators/pods.js | |
parent | e861452fb26553177ad4e32bfb18b4fd8a5b1816 (diff) | |
download | PeerTube-1e2564d3927ce4ca4ca9a09930da6da7ebb4e9a1.tar.gz PeerTube-1e2564d3927ce4ca4ca9a09930da6da7ebb4e9a1.tar.zst PeerTube-1e2564d3927ce4ca4ca9a09930da6da7ebb4e9a1.zip |
Server: make friends urls come from the request instead of the
configuration file
Diffstat (limited to 'server/middlewares/validators/pods.js')
-rw-r--r-- | server/middlewares/validators/pods.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/middlewares/validators/pods.js b/server/middlewares/validators/pods.js index fda2e865f..7c4d04aff 100644 --- a/server/middlewares/validators/pods.js +++ b/server/middlewares/validators/pods.js | |||
@@ -10,6 +10,11 @@ const validatorsPod = { | |||
10 | } | 10 | } |
11 | 11 | ||
12 | function makeFriends (req, res, next) { | 12 | function makeFriends (req, res, next) { |
13 | req.checkBody('urls', 'Should have an array of urls').isArray() | ||
14 | req.checkBody('urls', 'Should be an url').isEachUrl() | ||
15 | |||
16 | logger.debug('Checking makeFriends parameters', { parameters: req.body }) | ||
17 | |||
13 | friends.hasFriends(function (err, hasFriends) { | 18 | friends.hasFriends(function (err, hasFriends) { |
14 | if (err) { | 19 | if (err) { |
15 | logger.error('Cannot know if we have friends.', { error: err }) | 20 | logger.error('Cannot know if we have friends.', { error: err }) |