add route to sync dns records

merge the mail dns route with this one as well

fixes #737
This commit is contained in:
Girish Ramakrishnan
2021-02-24 18:42:39 -08:00
parent 93712c0f03
commit 70fbcf8ce4
8 changed files with 92 additions and 28 deletions

View File

@@ -17,6 +17,7 @@ exports = module.exports = {
setDashboardDomain,
updateDashboardDomain,
renewCerts,
syncDnsRecords,
runSystemChecks
};
@@ -401,3 +402,16 @@ function setupDnsAndCert(subdomain, domain, auditSource, progressCallback, callb
});
});
}
function syncDnsRecords(options, callback) {
assert.strictEqual(typeof options, 'object');
assert.strictEqual(typeof callback, 'function');
tasks.add(tasks.TASK_SYNC_DNS_RECORDS, [ options ], function (error, taskId) {
if (error) return callback(error);
tasks.startTask(taskId, {}, NOOP_CALLBACK);
callback(null, taskId);
});
}