mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 23:04:04 +00:00
Compare commits
3 commits
8d29e020a9
...
993ca7e2e4
Author | SHA1 | Date | |
---|---|---|---|
|
993ca7e2e4 | ||
|
8a432ac937 | ||
|
79895d455a |
2 changed files with 11 additions and 7 deletions
|
@ -86,7 +86,7 @@ async function createTables() {
|
|||
table.text("accepted_statuscodes_json").notNullable().defaultTo("[\"200-299\"]");
|
||||
table.string("dns_resolve_type", 5);
|
||||
table.string("dns_resolve_server", 255);
|
||||
table.string("dns_last_result", 255);
|
||||
table.string("dns_last_result", 2000);
|
||||
table.integer("retry_interval").notNullable().defaultTo(0);
|
||||
table.string("push_token", 20).defaultTo(null);
|
||||
table.text("method").notNullable().defaultTo("GET");
|
||||
|
|
|
@ -220,6 +220,9 @@ 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 data = [
|
||||
|
@ -227,6 +230,7 @@ module.exports.statusPageSocketHandler = (socket) => {
|
|||
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