dnsConfig provider can be caas

This commit is contained in:
Girish Ramakrishnan
2015-10-29 12:25:04 -07:00
parent 26fc1fd7a6
commit 06aaf98716
2 changed files with 20 additions and 13 deletions

View File

@@ -101,9 +101,7 @@ function getDnsConfig(req, res, next) {
function setDnsConfig(req, res, next) {
assert.strictEqual(typeof req.body, 'object');
if (req.body.provider !== 'route53') return next(new HttpError(400, 'provider is required'));
if (typeof req.body.accessKeyId !== 'string') return next(new HttpError(400, 'accessKeyId is required'));
if (typeof req.body.secretAccessKey !== 'string') return next(new HttpError(400, 'secretAccessKey is required'));
if (typeof req.body.provider !== 'string') return next(new HttpError(400, 'provider is required'));
settings.setDnsConfig(req.body, function (error) {
if (error && error.reason === SettingsError.BAD_FIELD) return next(new HttpError(400, error.message));