simplify extractAddress(monitorJSON) a bit more

This commit is contained in:
Frank Elsinga 2026-01-02 06:47:29 +01:00 committed by GitHub
parent 1532acaaf3
commit e4552a2184
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,8 +46,8 @@ class Discord extends NotificationProvider {
}
// If heartbeatJSON is not null, we go into the normal alerting loop.
let addess = this.extractAddress(monitorJSON);
if (heartbeatJSON["status"] === DOWN) {
let addess = this.extractAddress(monitorJSON);
let discorddowndata = {
username: discordDisplayName,
embeds: [{
@ -88,7 +88,6 @@ class Discord extends NotificationProvider {
return okMsg;
} else if (heartbeatJSON["status"] === UP) {
let addess = this.extractAddress(monitorJSON);
let discordupdata = {
username: discordDisplayName,
embeds: [{