mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-18 23:34:04 +02:00
Add important
query to push
This commit is contained in:
parent
5aeda2dab0
commit
28fe68c093
1 changed files with 2 additions and 1 deletions
|
@ -51,6 +51,7 @@ router.all("/api/push/:pushToken", async (request, response) => {
|
|||
let ping = parseFloat(request.query.ping) || null;
|
||||
let statusString = request.query.status || "up";
|
||||
const statusFromParam = (statusString === "up") ? UP : DOWN;
|
||||
const important = request.query.important !== undefined;
|
||||
|
||||
let monitor = await R.findOne("monitor", " push_token = ? AND active = 1 ", [
|
||||
pushToken
|
||||
|
@ -92,7 +93,7 @@ router.all("/api/push/:pushToken", async (request, response) => {
|
|||
log.debug("router", "PreviousStatus: " + previousHeartbeat?.status);
|
||||
log.debug("router", "Current Status: " + bean.status);
|
||||
|
||||
bean.important = Monitor.isImportantBeat(isFirstBeat, previousHeartbeat?.status, bean.status);
|
||||
bean.important = important || Monitor.isImportantBeat(isFirstBeat, previousHeartbeat?.status, bean.status);
|
||||
|
||||
if (Monitor.isImportantForNotification(isFirstBeat, previousHeartbeat?.status, bean.status)) {
|
||||
// Reset down count
|
||||
|
|
Loading…
Add table
Reference in a new issue