fix: tags are not saved if you don't save 2 times (#6491)

This commit is contained in:
iotux
2025-12-17 11:50:28 +01:00
committed by GitHub
parent 2a687ab67a
commit 3b0ab450d3
2 changed files with 9 additions and 1 deletions
+6
View File
@@ -1248,6 +1248,8 @@ let needSetup = false;
value,
]);
await server.sendUpdateMonitorIntoList(socket, monitorID);
callback({
ok: true,
msg: "successAdded",
@@ -1272,6 +1274,8 @@ let needSetup = false;
monitorID,
]);
await server.sendUpdateMonitorIntoList(socket, monitorID);
callback({
ok: true,
msg: "successEdited",
@@ -1296,6 +1300,8 @@ let needSetup = false;
value,
]);
await server.sendUpdateMonitorIntoList(socket, monitorID);
callback({
ok: true,
msg: "successDeleted",
+3 -1
View File
@@ -222,7 +222,9 @@ class UptimeKumaServer {
*/
async sendUpdateMonitorIntoList(socket, monitorID) {
let list = await this.getMonitorJSONList(socket.userID, monitorID);
this.io.to(socket.userID).emit("updateMonitorIntoList", list);
if (list && list[monitorID]) {
this.io.to(socket.userID).emit("updateMonitorIntoList", list);
}
}
/**