mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 14:54:05 +00:00
Compare commits
1 commit
6f3d6731b2
...
f7cb75105e
Author | SHA1 | Date | |
---|---|---|---|
|
f7cb75105e |
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
|
||||
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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue