mirror of
https://github.com/r-freeman/portfolio.git
synced 2025-04-12 01:54:31 +00:00
Update comment notification body
All checks were successful
Build And Publish / BuildAndPublish (push) Successful in 3m10s
All checks were successful
Build And Publish / BuildAndPublish (push) Successful in 3m10s
This commit is contained in:
parent
053a5d3768
commit
e9564826d0
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user