Add a way to re-sync mail DNS records
Also, make restore resync the admin domain record which gets messed up by the dns setup
This commit is contained in:
@@ -4,6 +4,7 @@ exports = module.exports = {
|
||||
get: get,
|
||||
|
||||
add: add,
|
||||
update: update,
|
||||
del: del,
|
||||
|
||||
getStatus: getStatus,
|
||||
@@ -60,6 +61,18 @@ function add(req, res, next) {
|
||||
});
|
||||
}
|
||||
|
||||
function update(req, res, next) {
|
||||
assert.strictEqual(typeof req.body, 'object');
|
||||
assert.strictEqual(typeof req.params.domain, 'string');
|
||||
|
||||
mail.update(req.params.domain, function (error) {
|
||||
if (error && error.reason === MailError.NOT_FOUND) return next(new HttpError(404, error.message));
|
||||
if (error) return next(new HttpError(500, error));
|
||||
|
||||
next(new HttpSuccess(202));
|
||||
});
|
||||
}
|
||||
|
||||
function del(req, res, next) {
|
||||
assert.strictEqual(typeof req.params.domain, 'string');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user