make *DNSRecords apis take the explicit domain

This commit is contained in:
Johannes Zellner
2017-11-16 22:13:30 +01:00
parent 321bfc6130
commit 27e4f0cb82
4 changed files with 18 additions and 21 deletions

View File

@@ -509,7 +509,7 @@ function readDkimPublicKeySync() {
function txtRecordsWithSpf(callback) {
assert.strictEqual(typeof callback, 'function');
domains.getDNSRecords(config.fqdn(), 'TXT', function (error, txtRecords) {
domains.getDNSRecords('', config.fqdn(), 'TXT', function (error, txtRecords) {
if (error) return callback(error);
debug('txtRecordsWithSpf: current txt records - %j', txtRecords);
@@ -892,7 +892,7 @@ function refreshDNS(callback) {
// do not change state of installing apps since apptask will error if dns record already exists
if (app.installationState !== appdb.ISTATE_INSTALLED) return callback();
domains.upsertDNSRecords(config.appFqdn(app), 'A', [ ip ], callback);
domains.upsertDNSRecords(app.location, app.domain, 'A', [ ip ], callback);
}, function (error) {
if (error) return callback(error);