mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-28 14:08:49 +03:00
19 lines
391 B
JavaScript
19 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,
|
|
});
|
|
}
|
|
});
|
|
|
|
};
|