]>
git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - middlewares/reqValidators/pods.js
6ccfd7361f756a7b38e488e501c20f0d632d91c6
4 var checkErrors
= require('./utils').checkErrors
5 var logger
= require('../../helpers/logger')
7 var reqValidatorsPod
= {
11 function podsAdd (req
, res
, next
) {
12 req
.checkBody('data.url', 'Should have an url').notEmpty().isURL({ require_protocol: true })
13 req
.checkBody('data.publicKey', 'Should have a public key').notEmpty()
15 logger
.debug('Checking podsAdd parameters', { parameters: req
.body
})
17 checkErrors(req
, res
, next
)
20 // ---------------------------------------------------------------------------
22 module
.exports
= reqValidatorsPod