mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-09 23:24:07 -08:00
made sure that the socket handlers have consitent names (#4818)
This commit is contained in:
parent
0ddf35e7b5
commit
9486fa22ee
|
@ -134,7 +134,7 @@ const testMode = !!args["test"] || false;
|
||||||
// Must be after io instantiation
|
// Must be after io instantiation
|
||||||
const { sendNotificationList, sendHeartbeatList, sendInfo, sendProxyList, sendDockerHostList, sendAPIKeyList, sendRemoteBrowserList } = require("./client");
|
const { sendNotificationList, sendHeartbeatList, sendInfo, sendProxyList, sendDockerHostList, sendAPIKeyList, sendRemoteBrowserList } = require("./client");
|
||||||
const { statusPageSocketHandler } = require("./socket-handlers/status-page-socket-handler");
|
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 { remoteBrowserSocketHandler } = require("./socket-handlers/remote-browser-socket-handler");
|
||||||
const TwoFA = require("./2fa");
|
const TwoFA = require("./2fa");
|
||||||
const StatusPage = require("./model/status_page");
|
const StatusPage = require("./model/status_page");
|
||||||
|
|
|
@ -6,7 +6,7 @@ const Database = require("../database");
|
||||||
* @param {Socket} socket Socket.io instance
|
* @param {Socket} socket Socket.io instance
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
module.exports = (socket) => {
|
module.exports.databaseSocketHandler = (socket) => {
|
||||||
|
|
||||||
// Post or edit incident
|
// Post or edit incident
|
||||||
socket.on("getDatabaseSize", async (callback) => {
|
socket.on("getDatabaseSize", async (callback) => {
|
||||||
|
|
|
@ -29,8 +29,13 @@ function getGameList() {
|
||||||
return gameList;
|
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) => {
|
module.exports.generalSocketHandler = (socket, server) => {
|
||||||
|
|
||||||
socket.on("initServerTimezone", async (timezone) => {
|
socket.on("initServerTimezone", async (timezone) => {
|
||||||
try {
|
try {
|
||||||
checkLogin(socket);
|
checkLogin(socket);
|
||||||
|
|
Loading…
Reference in a new issue