]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/pods.js
Server: add unique to unique indexes
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / pods.js
index b9b30e7a1bde4dd4d0220e3e6efcf7e8490bed49..0bf4b18446fb04791e258ef3df44bc45f7545a1a 100644 (file)
@@ -40,7 +40,8 @@ function makeFriends (req, res, next) {
 }
 
 function podsAdd (req, res, next) {
-  req.checkBody('host', 'Should have an host').isHostValid()
+  req.checkBody('host', 'Should have a host').isHostValid()
+  req.checkBody('email', 'Should have an email').isEmail()
   req.checkBody('publicKey', 'Should have a public key').notEmpty()
   logger.debug('Checking podsAdd parameters', { parameters: req.body })