mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-20 16:50:37 +08:00
Flashduty IntegrationKey support Endpoint URL (#5859)
This commit is contained in:
@@ -73,13 +73,13 @@ class FlashDuty extends NotificationProvider {
|
||||
}
|
||||
const options = {
|
||||
method: "POST",
|
||||
url: "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}`,
|
||||
title,
|
||||
event_status: eventStatus || "Info",
|
||||
alert_key: String(monitorInfo.id) || Math.random().toString(36).substring(7),
|
||||
alert_key: monitorInfo.id ? String(monitorInfo.id) : Math.random().toString(36).substring(7),
|
||||
labels,
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user