2015-11-07 14:16:26 +01:00
|
|
|
;(function () {
|
|
|
|
'use strict'
|
|
|
|
|
|
|
|
var checkErrors = require('./utils').checkErrors
|
2016-01-30 17:05:22 +01:00
|
|
|
var logger = require('../../helpers/logger')
|
2015-11-07 14:16:26 +01:00
|
|
|
|
|
|
|
var pods = {}
|
|
|
|
|
|
|
|
pods.podsAdd = function (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()
|
|
|
|
|
|
|
|
logger.debug('Checking podsAdd parameters', { parameters: req.body })
|
|
|
|
|
|
|
|
checkErrors(req, res, next)
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = pods
|
|
|
|
})()
|