Merge remote-tracking branch 'louislam/master' into feature/add-support-for-method-body-and-headers

This commit is contained in:
Bert Verhelst
2021-10-09 11:13:16 +02:00
66 changed files with 2786 additions and 160 deletions

View File

@@ -90,7 +90,7 @@ const io = new Server(server);
module.exports.io = io;
// Must be after io instantiation
const { sendNotificationList, sendHeartbeatList, sendImportantHeartbeatList } = require("./client");
const { sendNotificationList, sendHeartbeatList, sendImportantHeartbeatList, sendInfo } = require("./client");
const { statusPageSocketHandler } = require("./socket-handlers/status-page-socket-handler");
app.use(express.json());
@@ -180,10 +180,7 @@ exports.entryPage = "dashboard";
console.log("Adding socket handler");
io.on("connection", async (socket) => {
socket.emit("info", {
version: checkVersion.version,
latestVersion: checkVersion.latestVersion,
});
sendInfo(socket);
totalClient++;
@@ -873,6 +870,8 @@ exports.entryPage = "dashboard";
msg: "Saved"
});
sendInfo(socket);
} catch (e) {
callback({
ok: false,