Make domains.fqdn take config and domain separately

This way it can be used in the dns backends which don't have the domain object
This commit is contained in:
Girish Ramakrishnan
2019-01-04 14:04:12 -08:00
parent 635557ca45
commit 16c1622b1f
5 changed files with 22 additions and 18 deletions

View File

@@ -292,7 +292,7 @@ function setDashboardDomain(domain, callback) {
if (error && error.reason === DomainsError.NOT_FOUND) return callback(new CloudronError(CloudronError.BAD_FIELD, 'No such domain'));
if (error) return callback(new CloudronError(CloudronError.INTERNAL_ERROR, error));
const fqdn = domains.fqdn(constants.ADMIN_LOCATION, domainObject);
const fqdn = domains.fqdn(constants.ADMIN_LOCATION, domainObject.domain, domainObject.config);
config.setAdminDomain(domain);
config.setAdminLocation(constants.ADMIN_LOCATION);