mirror of
https://github.com/r-freeman/portfolio.git
synced 2025-04-18 21:54:47 +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')
|
await signIn('github')
|
||||||
}
|
}
|
||||||
|
|
||||||
const notificationBody = (comment: any, user: any) => {
|
const notificationBody = (comment: { id: number, content: string }, user: { name: string }) => {
|
||||||
return {
|
return {
|
||||||
topic: 'comments',
|
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: [
|
actions: [
|
||||||
{
|
{
|
||||||
action: 'http',
|
action: 'http',
|
||||||
@ -21,7 +21,8 @@ const notificationBody = (comment: any, user: any) => {
|
|||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${process.env.NTFY_TOKEN}`
|
Authorization: `Bearer ${process.env.NTFY_TOKEN}`
|
||||||
}
|
},
|
||||||
|
clear: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user