mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-05-19 21:52:35 +02:00
remove some unnessesary comments
This commit is contained in:
parent
7a0877aea9
commit
46474dd134
1 changed files with 1 additions and 7 deletions
|
@ -13,30 +13,24 @@ class Notifery extends NotificationProvider {
|
|||
const okMsg = "Sent Successfully.";
|
||||
const url = "https://api.notifery.com/event";
|
||||
|
||||
// Prepare request data
|
||||
let data = {
|
||||
title: notification.notiferyTitle || "Uptime Kuma Alert",
|
||||
message: msg,
|
||||
};
|
||||
|
||||
// Add group if specified
|
||||
if (notification.notiferyGroup) {
|
||||
data.group = notification.notiferyGroup;
|
||||
}
|
||||
|
||||
// Add link to monitor
|
||||
// Link to the monitor
|
||||
const baseURL = await setting("primaryBaseURL");
|
||||
if (baseURL && monitorJSON) {
|
||||
// Add monitor link as part of the message
|
||||
data.message += `\n\nMonitor: ${baseURL}${getMonitorRelativeURL(monitorJSON.id)}`;
|
||||
}
|
||||
|
||||
// Add code and duration if heartbeat exists
|
||||
if (heartbeatJSON) {
|
||||
// Add status code - if DOWN use code 1, otherwise 0
|
||||
data.code = heartbeatJSON.status === UP ? 0 : 1;
|
||||
|
||||
// Add ping duration if available
|
||||
if (heartbeatJSON.ping) {
|
||||
data.duration = heartbeatJSON.ping;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue