mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-05-20 06:02:33 +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 okMsg = "Sent Successfully.";
|
||||||
const url = "https://api.notifery.com/event";
|
const url = "https://api.notifery.com/event";
|
||||||
|
|
||||||
// Prepare request data
|
|
||||||
let data = {
|
let data = {
|
||||||
title: notification.notiferyTitle || "Uptime Kuma Alert",
|
title: notification.notiferyTitle || "Uptime Kuma Alert",
|
||||||
message: msg,
|
message: msg,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add group if specified
|
|
||||||
if (notification.notiferyGroup) {
|
if (notification.notiferyGroup) {
|
||||||
data.group = notification.notiferyGroup;
|
data.group = notification.notiferyGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add link to monitor
|
// Link to the monitor
|
||||||
const baseURL = await setting("primaryBaseURL");
|
const baseURL = await setting("primaryBaseURL");
|
||||||
if (baseURL && monitorJSON) {
|
if (baseURL && monitorJSON) {
|
||||||
// Add monitor link as part of the message
|
|
||||||
data.message += `\n\nMonitor: ${baseURL}${getMonitorRelativeURL(monitorJSON.id)}`;
|
data.message += `\n\nMonitor: ${baseURL}${getMonitorRelativeURL(monitorJSON.id)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add code and duration if heartbeat exists
|
|
||||||
if (heartbeatJSON) {
|
if (heartbeatJSON) {
|
||||||
// Add status code - if DOWN use code 1, otherwise 0
|
|
||||||
data.code = heartbeatJSON.status === UP ? 0 : 1;
|
data.code = heartbeatJSON.status === UP ? 0 : 1;
|
||||||
|
|
||||||
// Add ping duration if available
|
|
||||||
if (heartbeatJSON.ping) {
|
if (heartbeatJSON.ping) {
|
||||||
data.duration = heartbeatJSON.ping;
|
data.duration = heartbeatJSON.ping;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue