mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +00:00
Compare commits
1 commit
d63b65f21a
...
c4f80058d0
Author | SHA1 | Date | |
---|---|---|---|
|
c4f80058d0 |
1 changed files with 6 additions and 10 deletions
|
@ -220,17 +220,13 @@ 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) {
|
const slots = groupIDList.map(() => "?").join(",");
|
||||||
await R.exec("DELETE FROM `group` WHERE status_page_id = ?", [ statusPage.id ]);
|
|
||||||
} else {
|
|
||||||
const slots = groupIDList.map(() => "?").join(",");
|
|
||||||
|
|
||||||
const data = [
|
const data = [
|
||||||
...groupIDList,
|
...groupIDList,
|
||||||
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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue