settings: move mailFqdn/Domain into mailServer
This commit is contained in:
@@ -6,10 +6,6 @@ exports = module.exports = {
|
||||
// these values come from the cache
|
||||
dashboardDomain,
|
||||
setDashboardLocation,
|
||||
setMailLocation,
|
||||
|
||||
mailFqdn,
|
||||
mailDomain,
|
||||
|
||||
dashboardOrigin,
|
||||
dashboardFqdn,
|
||||
@@ -73,8 +69,6 @@ const gDefaults = (function () {
|
||||
const result = { };
|
||||
result[exports.DASHBOARD_DOMAIN_KEY] = '';
|
||||
result[exports.DASHBOARD_FQDN_KEY] = '';
|
||||
result[exports.MAIL_DOMAIN_KEY] = '';
|
||||
result[exports.MAIL_FQDN_KEY] = '';
|
||||
|
||||
return result;
|
||||
})();
|
||||
@@ -150,8 +144,6 @@ async function initCache() {
|
||||
gCache = {
|
||||
dashboardDomain: allSettings[exports.DASHBOARD_DOMAIN_KEY],
|
||||
dashboardFqdn: allSettings[exports.DASHBOARD_FQDN_KEY],
|
||||
mailDomain: allSettings[exports.MAIL_DOMAIN_KEY],
|
||||
mailFqdn: allSettings[exports.MAIL_FQDN_KEY],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -167,19 +159,6 @@ async function setDashboardLocation(dashboardDomain, dashboardFqdn) {
|
||||
gCache.dashboardFqdn = dashboardFqdn;
|
||||
}
|
||||
|
||||
async function setMailLocation(mailDomain, mailFqdn) {
|
||||
assert.strictEqual(typeof mailDomain, 'string');
|
||||
assert.strictEqual(typeof mailFqdn, 'string');
|
||||
|
||||
await set(exports.MAIL_DOMAIN_KEY, mailDomain);
|
||||
await set(exports.MAIL_FQDN_KEY, mailFqdn);
|
||||
|
||||
gCache.mailDomain = mailDomain;
|
||||
gCache.mailFqdn = mailFqdn;
|
||||
}
|
||||
|
||||
function dashboardDomain() { return gCache.dashboardDomain; }
|
||||
function dashboardFqdn() { return gCache.dashboardFqdn; }
|
||||
function mailDomain() { return gCache.mailDomain; }
|
||||
function mailFqdn() { return gCache.mailFqdn; }
|
||||
function dashboardOrigin() { return 'https://' + dashboardFqdn(); }
|
||||
|
||||
Reference in New Issue
Block a user