Compare commits

..

1 commit

Author SHA1 Message Date
michel_929
c4f80058d0
Merge 1fbe6b7ff4 into 778363a948 2024-11-11 10:08:57 +00:00

View file

@ -220,17 +220,13 @@ module.exports.statusPageSocketHandler = (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 = [
...groupIDList,
statusPage.id
];
await R.exec(`DELETE FROM \`group\` WHERE id NOT IN (${slots}) AND status_page_id = ?`, data);
}
const data = [
...groupIDList,
statusPage.id
];
await R.exec(`DELETE FROM \`group\` WHERE id NOT IN (${slots}) AND status_page_id = ?`, data);
const server = UptimeKumaServer.getInstance();