migrate to "export default"
also, set no-use-before-define in linter
This commit is contained in:
+21
-20
@@ -1,37 +1,27 @@
|
||||
import apps from './apps.js';
|
||||
import * as appstore from './appstore.js';
|
||||
import appstore from './appstore.js';
|
||||
import assert from 'node:assert';
|
||||
import BoxError from './boxerror.js';
|
||||
import * as branding from './branding.js';
|
||||
import branding from './branding.js';
|
||||
import constants from './constants.js';
|
||||
import debugModule from 'debug';
|
||||
import * as dns from './dns.js';
|
||||
import * as externalLdap from './externalldap.js';
|
||||
import dns from './dns.js';
|
||||
import externalLdap from './externalldap.js';
|
||||
import eventlog from './eventlog.js';
|
||||
import Location from './location.js';
|
||||
import * as mailServer from './mailserver.js';
|
||||
import * as platform from './platform.js';
|
||||
import * as reverseProxy from './reverseproxy.js';
|
||||
import mailServer from './mailserver.js';
|
||||
import platform from './platform.js';
|
||||
import reverseProxy from './reverseproxy.js';
|
||||
import safe from 'safetydance';
|
||||
import * as settings from './settings.js';
|
||||
import * as system from './system.js';
|
||||
import settings from './settings.js';
|
||||
import system from './system.js';
|
||||
import tasks from './tasks.js';
|
||||
import * as userDirectory from './user-directory.js';
|
||||
import userDirectory from './user-directory.js';
|
||||
|
||||
const debug = debugModule('box:dashboard');
|
||||
|
||||
const _setLocation = setLocation;
|
||||
|
||||
export {
|
||||
getLocation,
|
||||
clearLocation,
|
||||
startPrepareLocation, // starts the task,
|
||||
prepareLocation, // the task to setup dns and cert,
|
||||
setupLocation, // initial setup from setup/restore,
|
||||
changeLocation, // only on dashboard change (post setup/restore),
|
||||
getConfig,
|
||||
_setLocation,
|
||||
};
|
||||
|
||||
async function getLocation() {
|
||||
const domain = await settings.get(settings.DASHBOARD_DOMAIN_KEY);
|
||||
@@ -150,3 +140,14 @@ async function changeLocation(subdomain, domain, auditSource) {
|
||||
|
||||
await safe(reverseProxy.removeDashboardConfig(oldLocation.subdomain, oldLocation.domain), { debug });
|
||||
}
|
||||
|
||||
export default {
|
||||
getLocation,
|
||||
clearLocation,
|
||||
startPrepareLocation, // starts the task,
|
||||
prepareLocation, // the task to setup dns and cert,
|
||||
setupLocation, // initial setup from setup/restore,
|
||||
changeLocation, // only on dashboard change (post setup/restore),
|
||||
getConfig,
|
||||
_setLocation,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user