remove some unnessesary comments

This commit is contained in:
Frank Elsinga 2025-05-11 15:15:19 +02:00 committed by GitHub
parent 7a0877aea9
commit 46474dd134
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
} }