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

This commit is contained in:
iotux 2025-12-17 17:50:28 +07:00 committed by GitHub
parent 2a687ab67a
commit 3b0ab450d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

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",

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);
}
}
/**