|
|
|
@ -242,7 +242,7 @@ class Notification {
|
|
|
|
|
if (heartbeatJSON == null) {
|
|
|
|
|
let testdata = {
|
|
|
|
|
"title": "Uptime Kuma Alert",
|
|
|
|
|
"body": "Testing Successful."
|
|
|
|
|
"body": "Testing Successful.",
|
|
|
|
|
}
|
|
|
|
|
await axios.post(lunaseadevice, testdata)
|
|
|
|
|
return okMsg;
|
|
|
|
@ -251,7 +251,7 @@ class Notification {
|
|
|
|
|
if (heartbeatJSON["status"] == 0) {
|
|
|
|
|
let downdata = {
|
|
|
|
|
"title": "UptimeKuma Alert:" + monitorJSON["name"],
|
|
|
|
|
"body": "[🔴 Down]"+heartbeatJSON["msg"]+ "\nTime (UTC):" + heartbeatJSON["time"]
|
|
|
|
|
"body": "[🔴 Down]" + heartbeatJSON["msg"] + "\nTime (UTC):" + heartbeatJSON["time"],
|
|
|
|
|
}
|
|
|
|
|
await axios.post(lunaseadevice, downdata)
|
|
|
|
|
return okMsg;
|
|
|
|
@ -260,7 +260,7 @@ class Notification {
|
|
|
|
|
if (heartbeatJSON["status"] == 1) {
|
|
|
|
|
let updata = {
|
|
|
|
|
"title": "UptimeKuma Alert:" + monitorJSON["name"],
|
|
|
|
|
"body": "[✅ Up]"+heartbeatJSON["msg"]+ "\nTime (UTC):" + heartbeatJSON["time"]
|
|
|
|
|
"body": "[✅ Up]" + heartbeatJSON["msg"] + "\nTime (UTC):" + heartbeatJSON["time"],
|
|
|
|
|
}
|
|
|
|
|
await axios.post(lunaseadevice, updata)
|
|
|
|
|
return okMsg;
|
|
|
|
|