]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/pods.js
Server: make friends urls come from the request instead of the
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / pods.js
index fda2e865f58157ebc6a852aa8e130ce0fa8d5a9c..7c4d04affc8b497cab3d2a703ed879a86543a401 100644 (file)
@@ -10,6 +10,11 @@ const validatorsPod = {
 }
 
 function makeFriends (req, res, next) {
+  req.checkBody('urls', 'Should have an array of urls').isArray()
+  req.checkBody('urls', 'Should be an url').isEachUrl()
+
+  logger.debug('Checking makeFriends parameters', { parameters: req.body })
+
   friends.hasFriends(function (err, hasFriends) {
     if (err) {
       logger.error('Cannot know if we have friends.', { error: err })