store subdomain in database instead of fqdn

this makes it more consistent with the locations table
This commit is contained in:
Girish Ramakrishnan
2023-08-16 19:28:04 +05:30
parent 1133a41b77
commit de7879afb5
9 changed files with 57 additions and 38 deletions

View File

@@ -215,14 +215,14 @@ async function databaseSetup() {
await database.initialize();
await database._clear();
await appstore._setApiServerOrigin(exports.mockApiServerOrigin);
await dashboard._setLocation(exports.dashboardDomain);
await dashboard._setLocation(constants.DASHBOARD_SUBDOMAIN, exports.dashboardDomain);
}
async function domainSetup() {
nock.cleanAll();
await databaseSetup();
await mailServer.setLocation(domain.domain, `${constants.DASHBOARD_SUBDOMAIN}.${domain.domain}`); // default mail location. do this before we add the domain for upserting mail DNS
await mailServer.setLocation(constants.DASHBOARD_SUBDOMAIN, domain.domain); // default mail location. do this before we add the domain for upserting mail DNS
await domains.add(domain.domain, domain, auditSource);
}