|
|
@ -220,6 +220,9 @@ module.exports.statusPageSocketHandler = (socket) => {
|
|
|
|
|
|
|
|
|
|
|
|
// Delete groups that are not in the list
|
|
|
|
// Delete groups that are not in the list
|
|
|
|
log.debug("socket", "Delete groups that are not in the list");
|
|
|
|
log.debug("socket", "Delete groups that are not in the list");
|
|
|
|
|
|
|
|
if (groupIDList.length === 0) {
|
|
|
|
|
|
|
|
await R.exec("DELETE FROM `group` WHERE status_page_id = ?", [ statusPage.id ]);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
const slots = groupIDList.map(() => "?").join(",");
|
|
|
|
const slots = groupIDList.map(() => "?").join(",");
|
|
|
|
|
|
|
|
|
|
|
|
const data = [
|
|
|
|
const data = [
|
|
|
@ -227,6 +230,7 @@ module.exports.statusPageSocketHandler = (socket) => {
|
|
|
|
statusPage.id
|
|
|
|
statusPage.id
|
|
|
|
];
|
|
|
|
];
|
|
|
|
await R.exec(`DELETE FROM \`group\` WHERE id NOT IN (${slots}) AND status_page_id = ?`, data);
|
|
|
|
await R.exec(`DELETE FROM \`group\` WHERE id NOT IN (${slots}) AND status_page_id = ?`, data);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const server = UptimeKumaServer.getInstance();
|
|
|
|
const server = UptimeKumaServer.getInstance();
|
|
|
|
|
|
|
|
|
|
|
|