diff --git a/server/server.js b/server/server.js index f14cb2dd6..e96ff0181 100644 --- a/server/server.js +++ b/server/server.js @@ -134,7 +134,7 @@ const testMode = !!args["test"] || false; // Must be after io instantiation const { sendNotificationList, sendHeartbeatList, sendInfo, sendProxyList, sendDockerHostList, sendAPIKeyList, sendRemoteBrowserList } = require("./client"); const { statusPageSocketHandler } = require("./socket-handlers/status-page-socket-handler"); -const databaseSocketHandler = require("./socket-handlers/database-socket-handler"); +const { databaseSocketHandler } = require("./socket-handlers/database-socket-handler"); const { remoteBrowserSocketHandler } = require("./socket-handlers/remote-browser-socket-handler"); const TwoFA = require("./2fa"); const StatusPage = require("./model/status_page"); diff --git a/server/socket-handlers/database-socket-handler.js b/server/socket-handlers/database-socket-handler.js index bcf34c906..ee2394bf6 100644 --- a/server/socket-handlers/database-socket-handler.js +++ b/server/socket-handlers/database-socket-handler.js @@ -6,7 +6,7 @@ const Database = require("../database"); * @param {Socket} socket Socket.io instance * @returns {void} */ -module.exports = (socket) => { +module.exports.databaseSocketHandler = (socket) => { // Post or edit incident socket.on("getDatabaseSize", async (callback) => { diff --git a/server/socket-handlers/general-socket-handler.js b/server/socket-handlers/general-socket-handler.js index 68e1f814c..50dcd946e 100644 --- a/server/socket-handlers/general-socket-handler.js +++ b/server/socket-handlers/general-socket-handler.js @@ -29,8 +29,13 @@ function getGameList() { return gameList; } +/** + * Handler for general events + * @param {Socket} socket Socket.io instance + * @param {UptimeKumaServer} server Uptime Kuma server + * @returns {void} + */ module.exports.generalSocketHandler = (socket, server) => { - socket.on("initServerTimezone", async (timezone) => { try { checkLogin(socket);