mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-18 02:47:24 +00:00
Drop exports.entryPage fully
This commit is contained in:
parent
3e699f8ac3
commit
ad1a7c255f
1 changed files with 4 additions and 6 deletions
|
@ -127,6 +127,7 @@ const StatusPage = require("./model/status_page");
|
||||||
const { cloudflaredSocketHandler, autoStart: cloudflaredAutoStart, stop: cloudflaredStop } = require("./socket-handlers/cloudflared-socket-handler");
|
const { cloudflaredSocketHandler, autoStart: cloudflaredAutoStart, stop: cloudflaredStop } = require("./socket-handlers/cloudflared-socket-handler");
|
||||||
const { proxySocketHandler } = require("./socket-handlers/proxy-socket-handler");
|
const { proxySocketHandler } = require("./socket-handlers/proxy-socket-handler");
|
||||||
const { dockerSocketHandler } = require("./socket-handlers/docker-socket-handler");
|
const { dockerSocketHandler } = require("./socket-handlers/docker-socket-handler");
|
||||||
|
const { Settings } = require("./settings");
|
||||||
|
|
||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
|
|
||||||
|
@ -155,9 +156,7 @@ let needSetup = false;
|
||||||
Database.init(args);
|
Database.init(args);
|
||||||
await initDatabase(testMode);
|
await initDatabase(testMode);
|
||||||
|
|
||||||
const entryPage = (await getSettings("general"))["entryPage"];
|
server.entryPage = await Settings.get("entryPage");
|
||||||
exports.entryPage = entryPage;
|
|
||||||
UptimeKumaServer.getInstance().entryPage = entryPage;
|
|
||||||
await StatusPage.loadDomainMappingList();
|
await StatusPage.loadDomainMappingList();
|
||||||
|
|
||||||
log.info("server", "Adding route");
|
log.info("server", "Adding route");
|
||||||
|
@ -178,7 +177,7 @@ let needSetup = false;
|
||||||
|
|
||||||
log.debug("entry", `Request Domain: ${hostname}`);
|
log.debug("entry", `Request Domain: ${hostname}`);
|
||||||
|
|
||||||
const uptimeKumaEntryPage = UptimeKumaServer.getInstance().entryPage;
|
const uptimeKumaEntryPage = server.entryPage;
|
||||||
if (hostname in StatusPage.domainMappingList) {
|
if (hostname in StatusPage.domainMappingList) {
|
||||||
log.debug("entry", "This is a status page domain");
|
log.debug("entry", "This is a status page domain");
|
||||||
|
|
||||||
|
@ -1087,8 +1086,7 @@ let needSetup = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
await setSettings("general", data);
|
await setSettings("general", data);
|
||||||
exports.entryPage = data.entryPage;
|
server.entryPage = data.entryPage;
|
||||||
UptimeKumaServer.getInstance().entryPage = data.entryPage;
|
|
||||||
|
|
||||||
callback({
|
callback({
|
||||||
ok: true,
|
ok: true,
|
||||||
|
|
Loading…
Reference in a new issue