upd: api error

This commit is contained in:
2025-08-28 15:20:09 +08:00
parent 1621e95af2
commit ca699f1430
6 changed files with 11 additions and 11 deletions

View File

@@ -313,13 +313,13 @@ export async function POST(request: Request) {
tokenDup.push(...omitFCM.map((v: any) => v.tokens).flat())
}
dataNotif.filter((v: any) => v.idUserTo != undefined && v.idUserTo != null && v.idUserTo != "" && v.idUserTo != userId)
const dataNotifFilter = dataNotif.filter((v: any) => v.idUserTo != undefined && v.idUserTo != null && v.idUserTo != "" && v.idUserTo != userId)
const pushNotif = dataPush.filter((item) => item.subscription != undefined)
const sendWebPush = await funSendWebPush({ sub: pushNotif, message: { title: 'Divisi Baru', body: 'Terdapat divisi baru. Silahkan periksa detailnya.' } })
const insertNotif = await prisma.notifications.createMany({
data: dataNotif
data: dataNotifFilter
})
const tokenUnique = [...new Set(tokenDup.flat())];