Update comment notification body
All checks were successful
Build And Publish / BuildAndPublish (push) Successful in 3m10s

This commit is contained in:
Ryan Freeman 2025-03-22 16:32:53 +00:00
parent 053a5d3768
commit e9564826d0

View File

@ -9,10 +9,10 @@ export async function loginWithGitHub() {
await signIn('github')
}
const notificationBody = (comment: any, user: any) => {
const notificationBody = (comment: { id: number, content: string }, user: { name: string }) => {
return {
topic: 'comments',
message: `You have a new comment from ${user.name}:\n${comment.content}\n`,
message: `You've got a new comment from ${user.name}:\n${comment.content}`,
actions: [
{
action: 'http',
@ -21,7 +21,8 @@ const notificationBody = (comment: any, user: any) => {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.NTFY_TOKEN}`
}
},
clear: true
}
]
}