mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-09-04 09:13:21 +00:00
chore: enable formatting over the entire codebase in CI (#6655)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
autofix-ci[bot]
parent
6658f2ce41
commit
0f61d7ee1b
@@ -17,7 +17,7 @@ class FlashDuty extends NotificationProvider {
|
||||
const monitor = {
|
||||
type: "ping",
|
||||
url: msg,
|
||||
name: "https://flashcat.cloud"
|
||||
name: "https://flashcat.cloud",
|
||||
};
|
||||
return this.postNotification(notification, title, msg, monitor);
|
||||
}
|
||||
@@ -30,7 +30,13 @@ class FlashDuty extends NotificationProvider {
|
||||
|
||||
if (heartbeatJSON.status === DOWN) {
|
||||
const title = "Uptime Kuma Monitor 🔴 Down";
|
||||
return this.postNotification(notification, title, heartbeatJSON.msg, monitorJSON, notification.flashdutySeverity);
|
||||
return this.postNotification(
|
||||
notification,
|
||||
title,
|
||||
heartbeatJSON.msg,
|
||||
monitorJSON,
|
||||
notification.flashdutySeverity
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
this.throwGeneralAxiosError(error);
|
||||
@@ -73,7 +79,10 @@ class FlashDuty extends NotificationProvider {
|
||||
}
|
||||
const options = {
|
||||
method: "POST",
|
||||
url: notification.flashdutyIntegrationKey.startsWith("http") ? notification.flashdutyIntegrationKey : "https://api.flashcat.cloud/event/push/alert/standard?integration_key=" + notification.flashdutyIntegrationKey,
|
||||
url: notification.flashdutyIntegrationKey.startsWith("http")
|
||||
? notification.flashdutyIntegrationKey
|
||||
: "https://api.flashcat.cloud/event/push/alert/standard?integration_key=" +
|
||||
notification.flashdutyIntegrationKey,
|
||||
headers: { "Content-Type": "application/json" },
|
||||
data: {
|
||||
description: `[${title}] [${monitorInfo.name}] ${body}`,
|
||||
@@ -81,7 +90,7 @@ class FlashDuty extends NotificationProvider {
|
||||
event_status: eventStatus || "Info",
|
||||
alert_key: monitorInfo.id ? String(monitorInfo.id) : Math.random().toString(36).substring(7),
|
||||
labels,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
const baseURL = await setting("primaryBaseURL");
|
||||
|
||||
Reference in New Issue
Block a user