Apply suggestions from code review

Co-authored-by: Nelson Chan <3271800+chakflying@users.noreply.github.com>
pull/3886/head
Daan Meijer 7 months ago committed by GitHub
parent 9c7f81746a
commit f94faa2f4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -71,7 +71,7 @@ class Slack extends NotificationProvider {
* @param {object} heartbeatJSON The heartbeat object
* @param {string} title The message title
* @param {string} msg The message body
* @returns {Promise<*[object]>} The rich content blocks for the Slack message
* @returns {Array<object>} The rich content blocks for the Slack message
*/
static buildBlocks(baseURL, monitorJSON, heartbeatJSON, title, msg) {
@ -147,7 +147,7 @@ class Slack extends NotificationProvider {
"attachments": [
{
"color": (heartbeatJSON["status"] === UP) ? "#2eb886" : "#e01e5a",
"blocks": await Slack.buildBlocks(baseURL, monitorJSON, heartbeatJSON, title, msg),
"blocks": Slack.buildBlocks(baseURL, monitorJSON, heartbeatJSON, title, msg),
}
]
};

Loading…
Cancel
Save