Remove dns related settings api

This is replaced with the multi domain aware api
This commit is contained in:
Johannes Zellner
2017-11-08 23:42:11 +01:00
parent 707d34cb89
commit 4cf2978088
7 changed files with 50 additions and 121 deletions

View File

@@ -12,9 +12,6 @@ exports = module.exports = {
getEmailStatus: getEmailStatus,
getDnsConfig: getDnsConfig,
setDnsConfig: setDnsConfig,
getBackupConfig: getBackupConfig,
setBackupConfig: setBackupConfig,
@@ -239,27 +236,6 @@ function getEmailStatus(req, res, next) {
});
}
function getDnsConfig(req, res, next) {
settings.getDnsConfig(function (error, config) {
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(200, config));
});
}
function setDnsConfig(req, res, next) {
assert.strictEqual(typeof req.body, 'object');
if (typeof req.body.provider !== 'string') return next(new HttpError(400, 'provider is required'));
settings.setDnsConfig(req.body, config.fqdn(), config.zoneName(), function (error) {
if (error && error.reason === SettingsError.BAD_FIELD) return next(new HttpError(400, error.message));
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(200));
});
}
function getBackupConfig(req, res, next) {
settings.getBackupConfig(function (error, config) {
if (error) return next(new HttpError(500, error));