mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-04 12:22:35 +02:00
refactor: loop when monitorInfo.tags exist
This commit is contained in:
parent
7557073619
commit
f8495a970b
1 changed files with 4 additions and 2 deletions
|
@ -63,8 +63,10 @@ class FlashDuty extends NotificationProvider {
|
|||
resource: this.genMonitorUrl(monitorInfo),
|
||||
check: monitorInfo.name,
|
||||
};
|
||||
for (let tag of monitorInfo.tags) {
|
||||
labels[tag.name] = tag.value;
|
||||
if (monitorInfo.tags && monitorInfo.tags.length > 0) {
|
||||
for (let tag of monitorInfo.tags) {
|
||||
labels[tag.name] = tag.value;
|
||||
}
|
||||
}
|
||||
const options = {
|
||||
method: "POST",
|
||||
|
|
Loading…
Add table
Reference in a new issue