aboutsummaryrefslogtreecommitdiffhomepage
path: root/middlewares/reqValidators/pods.js
diff options
context:
space:
mode:
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})()