pass domain object to reduce one query
This commit is contained in:
@@ -452,12 +452,11 @@ async function writeDashboardNginxConfig(vhost, bundle) {
|
||||
await reload();
|
||||
}
|
||||
|
||||
async function writeDashboardConfig(domain) {
|
||||
assert.strictEqual(typeof domain, 'string');
|
||||
async function writeDashboardConfig(domainObject) {
|
||||
assert.strictEqual(typeof domainObject, 'object');
|
||||
|
||||
debug(`writeDashboardConfig: writing admin config for ${domain}`);
|
||||
debug(`writeDashboardConfig: writing admin config for ${domainObject.domain}`);
|
||||
|
||||
const domainObject = await domains.get(domain);
|
||||
const dashboardFqdn = dns.fqdn(constants.DASHBOARD_LOCATION, domainObject);
|
||||
const bundle = await getCertificatePath(dashboardFqdn, domainObject.domain);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user