Skip to content

Commit

Permalink
Updated Slack test notification
Browse files Browse the repository at this point in the history
  • Loading branch information
NiNiyas authored Jul 14, 2021
1 parent 63c6e29 commit 60493f0
Showing 1 changed file with 1 addition and 36 deletions.
37 changes: 1 addition & 36 deletions server/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,42 +128,7 @@ class Notification {
} else if (notification.type === "slack") {
try {
if (heartbeatJSON == null) {
let data = {
"blocks": [{
"type": "header",
"text": {
"type": "plain_text",
"text": "Uptime Kuma - Slack Testing"
}
},
{
"type": "section",
"fields": [{
"type": "mrkdwn",
"text": "*Message*\nSlack Testing"
},
{
"type": "mrkdwn",
"text": "*Time (UTC)*\nSlack Testing"
}
]
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Visit Uptime Kuma",
},
"value": "Uptime-Kuma",
"url": notification.slackbutton
}
]
}
]
}
let data = {'text': "Uptime Kuma Slack testing successful."}
let res = await axios.post(notification.slackwebhookURL, data)
return true;
}
Expand Down

0 comments on commit 60493f0

Please sign in to comment.