upd: notif insert
Deskripsi: - mengganti kalimat notifikasi sesuai dengan content yg diinputkan - upd api version No Issues
This commit is contained in:
@@ -203,7 +203,7 @@ export async function POST(request: Request) {
|
||||
category: 'announcement',
|
||||
idContent: data.id,
|
||||
title: 'Pengumuman Baru',
|
||||
desc: 'Anda memiliki pengumuman baru. Silakan periksa detailnya.'
|
||||
desc: title
|
||||
}))
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ export async function POST(request: Request) {
|
||||
category: 'announcement',
|
||||
idContent: data.id,
|
||||
title: 'Pengumuman Baru',
|
||||
desc: 'Anda memiliki pengumuman baru. Silakan periksa detailnya.'
|
||||
desc: title
|
||||
})
|
||||
|
||||
dataPush.push({
|
||||
@@ -258,7 +258,7 @@ export async function POST(request: Request) {
|
||||
|
||||
const pushNotif = dataPush.filter((item) => item.subscription != undefined)
|
||||
|
||||
const sendWebPush = await funSendWebPush({ sub: pushNotif, message: { title: 'Pengumuman Baru', body: 'Anda memiliki pengumuman baru. Silakan periksa detailnya.' } })
|
||||
const sendWebPush = await funSendWebPush({ sub: pushNotif, message: { title: 'Pengumuman Baru', body: title } })
|
||||
const insertNotif = await prisma.notifications.createMany({
|
||||
data: dataNotifFilter
|
||||
})
|
||||
@@ -267,7 +267,7 @@ export async function POST(request: Request) {
|
||||
await sendFCMNotificationMany({
|
||||
token: tokenUnique,
|
||||
title: "Pengumuman Baru",
|
||||
body: "Anda memiliki pengumuman baru. Silakan periksa detailnya.",
|
||||
body: title,
|
||||
data: { id: data.id, category: "announcement", content: data.id }
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user