Skip to content

Commit

Permalink
♻️ chore: test
Browse files Browse the repository at this point in the history
  • Loading branch information
yunsii committed Mar 15, 2024
1 parent d778f12 commit 1ba269f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/worker/_helpers/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export async function notifySlack(monitor: Monitor, operational: boolean, option
},
],
}
return fetch(webhook, {
return await fetch(webhook, {
body: JSON.stringify(payload),
method: 'POST',
headers: { 'Content-Type': 'application/json' },
Expand Down Expand Up @@ -84,7 +84,7 @@ export async function notifyTelegram(monitor: Monitor, operational: boolean, opt
payload.append('text', text)

const telegramUrl = `https://api.telegram.org/bot${apiToken}/sendMessage`
return fetch(telegramUrl, {
return await fetch(telegramUrl, {
body: payload,
method: 'POST',
})
Expand Down Expand Up @@ -115,11 +115,13 @@ export async function notifyDiscord(monitor: Monitor, operational: boolean, opti
},
],
}
return fetch(webhook, {
const result = await fetch(webhook, {
body: JSON.stringify(payload),
method: 'POST',
headers: { 'Content-Type': 'application/json' },
})
// eslint-disable-next-line no-console
console.log('🚀 ~ file: notifications.ts:123 ~ notifyDiscord ~ result:', result)
}

export function getNotificationCount() {
Expand Down

0 comments on commit 1ba269f

Please sign in to comment.