upd: notif insert

Deskripsi:
- mengganti kalimat notifikasi sesuai dengan content yg diinputkan
- upd api version

No Issues
This commit is contained in:
2025-09-30 14:40:37 +08:00
parent 6910f8fdff
commit 9a6a4d66df
15 changed files with 67 additions and 60 deletions

View File

@@ -184,7 +184,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
}))
const dataPush = memberNotif.map((v: any) => ({
@@ -217,7 +217,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({
@@ -229,7 +229,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: dataNotif
})