uptime-kuma/server/socket-handlers/cloudflared-socket-handler.js
2022-03-29 14:48:02 +08:00

20 lines
391 B
JavaScript

const { checkLogin } = require("../util-server");
const prefix = "cloudflared_";
module.exports.cloudflaredSocketHandler = (socket) => {
socket.on(prefix + "start", async (callback) => {
try {
checkLogin(socket);
} catch (error) {
callback({
ok: false,
msg: error.message,
});
}
});
};