mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 14:54:05 +00:00
Compare commits
3 commits
f7cb75105e
...
6f3d6731b2
Author | SHA1 | Date | |
---|---|---|---|
|
6f3d6731b2 | ||
|
8a432ac937 | ||
|
df2f76dbe3 |
2 changed files with 18 additions and 6 deletions
|
@ -40,6 +40,14 @@ class Heartbeat extends BeanModel {
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: Find the msg from the `msg` table and get the msg_id
|
||||
* @param value
|
||||
*/
|
||||
set msg(value) {
|
||||
throw new Error("Not implemented yet")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = Heartbeat;
|
||||
|
|
|
@ -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