aboutsummaryrefslogtreecommitdiffhomepage
path: root/middlewares/reqValidators/pods.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-01-31 11:23:52 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-01-31 11:23:52 +0100
commitc45f7f84001c2731909db04dd82e1c1f290386eb (patch)
treeb7e57420a1f65dfbbacc1a532bf489c9bea6125d /middlewares/reqValidators/pods.js
parentcda021079ff455cc0fd0eb95a5395fa808ab63d1 (diff)
downloadPeerTube-c45f7f84001c2731909db04dd82e1c1f290386eb.tar.gz
PeerTube-c45f7f84001c2731909db04dd82e1c1f290386eb.tar.zst
PeerTube-c45f7f84001c2731909db04dd82e1c1f290386eb.zip
Infile code reorganization
Diffstat (limited to 'middlewares/reqValidators/pods.js')
-rw-r--r--middlewares/reqValidators/pods.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/middlewares/reqValidators/pods.js b/middlewares/reqValidators/pods.js
index 0d023842d..6ccfd7361 100644
--- a/middlewares/reqValidators/pods.js
+++ b/middlewares/reqValidators/pods.js
@@ -4,9 +4,11 @@
4 var checkErrors = require('./utils').checkErrors 4 var checkErrors = require('./utils').checkErrors
5 var logger = require('../../helpers/logger') 5 var logger = require('../../helpers/logger')
6 6
7 var pods = {} 7 var reqValidatorsPod = {
8 podsAdd: podsAdd
9 }
8 10
9 pods.podsAdd = function (req, res, next) { 11 function podsAdd (req, res, next) {
10 req.checkBody('data.url', 'Should have an url').notEmpty().isURL({ require_protocol: true }) 12 req.checkBody('data.url', 'Should have an url').notEmpty().isURL({ require_protocol: true })
11 req.checkBody('data.publicKey', 'Should have a public key').notEmpty() 13 req.checkBody('data.publicKey', 'Should have a public key').notEmpty()
12 14
@@ -15,5 +17,7 @@
15 checkErrors(req, res, next) 17 checkErrors(req, res, next)
16 } 18 }
17 19
18 module.exports = pods 20 // ---------------------------------------------------------------------------
21
22 module.exports = reqValidatorsPod
19})() 23})()