portfolio/lib/ntfy.ts
Ryan Freeman 053a5d3768
All checks were successful
Build And Publish / BuildAndPublish (push) Successful in 3m12s
Add comment notifications
2025-03-22 15:55:18 +00:00

15 lines
393 B
TypeScript

import fetcher from '@/lib/fetcher'
const NTFY_URL = process.env.NTFY_URL || ''
export async function sendNotification(notificationBody: any) {
if (NTFY_URL !== '') {
await fetcher(NTFY_URL, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(notificationBody)
})
}
}