mirror of
https://github.com/r-freeman/portfolio.git
synced 2025-04-12 00:44:31 +00:00
All checks were successful
Build And Publish / BuildAndPublish (push) Successful in 3m12s
15 lines
393 B
TypeScript
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)
|
|
})
|
|
}
|
|
} |