mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-06 05:24:26 -04:00
Made sure that more of the async usages are awaited (#4574)
This commit is contained in:
parent
a9a1cf1353
commit
0e3b3a9ab8
19 changed files with 53 additions and 53 deletions
|
@ -21,7 +21,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 {
|
||||
|
@ -31,7 +31,7 @@ class DingDing extends NotificationProvider {
|
|||
content: msg
|
||||
}
|
||||
};
|
||||
if (this.sendToDingDing(notification, params)) {
|
||||
if (await this.sendToDingDing(notification, params)) {
|
||||
return okMsg;
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ class DingDing extends NotificationProvider {
|
|||
* Send message to DingDing
|
||||
* @param {BeanModel} notification Notification to send
|
||||
* @param {object} params Parameters of message
|
||||
* @returns {boolean} True if successful else false
|
||||
* @returns {Promise<boolean>} True if successful else false
|
||||
*/
|
||||
async sendToDingDing(notification, params) {
|
||||
let timestamp = Date.now();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue