add route to sync dns records
merge the mail dns route with this one as well fixes #737
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
exports = module.exports = {
|
||||
getDomain,
|
||||
|
||||
setDnsRecords,
|
||||
|
||||
getStatus,
|
||||
|
||||
setMailFromValidation,
|
||||
@@ -50,21 +48,6 @@ function getDomain(req, res, next) {
|
||||
});
|
||||
}
|
||||
|
||||
function setDnsRecords(req, res, next) {
|
||||
assert.strictEqual(typeof req.body, 'object');
|
||||
assert.strictEqual(typeof req.params.domain, 'string');
|
||||
|
||||
// can take a setup all the DNS entries. this is mostly because some backends try to list DNS entries (DO)
|
||||
// for upsert and this takes a lot of time
|
||||
req.clearTimeout();
|
||||
|
||||
mail.setDnsRecords(req.params.domain, function (error) {
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(201));
|
||||
});
|
||||
}
|
||||
|
||||
function getStatus(req, res, next) {
|
||||
assert.strictEqual(typeof req.params.domain, 'string');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user