]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/reqValidators/pods.js
Try to make a better communication (between pods) module
[github/Chocobozzz/PeerTube.git] / server / middlewares / reqValidators / pods.js
index 77449480c43df174acedc217c428f569f0af8612..78a4b76c13ef99cc76aed41a8a4cbae86bd0f2c8 100644 (file)
@@ -26,8 +26,10 @@ function makeFriends (req, res, next) {
 }
 
 function podsAdd (req, res, next) {
-  req.checkBody('data.url', 'Should have an url').notEmpty().isURL({ require_protocol: true })
-  req.checkBody('data.publicKey', 'Should have a public key').notEmpty()
+  req.checkBody('url', 'Should have an url').notEmpty().isURL({ require_protocol: true })
+  req.checkBody('publicKey', 'Should have a public key').notEmpty()
+
+  // TODO: check we don't have it already
 
   logger.debug('Checking podsAdd parameters', { parameters: req.body })