mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 08:44:04 +00:00
fix(notification-dingding): throw error when failed (#3598)
This commit is contained in:
parent
7635ab54a0
commit
b4e45c7ce8
1 changed files with 3 additions and 3 deletions
|
@ -18,7 +18,7 @@ class DingDing extends NotificationProvider {
|
|||
text: `## [${this.statusToString(heartbeatJSON["status"])}] ${monitorJSON["name"]} \n> ${heartbeatJSON["msg"]}\n> Time (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`,
|
||||
}
|
||||
};
|
||||
if (this.sendToDingDing(notification, params)) {
|
||||
if (await this.sendToDingDing(notification, params)) {
|
||||
return okMsg;
|
||||
}
|
||||
} else {
|
||||
|
@ -28,7 +28,7 @@ class DingDing extends NotificationProvider {
|
|||
content: msg
|
||||
}
|
||||
};
|
||||
if (this.sendToDingDing(notification, params)) {
|
||||
if (await this.sendToDingDing(notification, params)) {
|
||||
return okMsg;
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ class DingDing extends NotificationProvider {
|
|||
if (result.data.errmsg === "ok") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
throw new Error(result.data.errmsg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue