upd : data notif kosong

Deskripsi:
- filter data notif dg iduser = undefined

No Issues
This commit is contained in:
2025-08-28 15:08:14 +08:00
parent e5eb2e1cc2
commit 1621e95af2
4 changed files with 7 additions and 1 deletions

View File

@@ -384,6 +384,7 @@ export async function POST(request: Request) {
tokenDup.push(...omitFCM.map((v: any) => v.tokens).flat())
}
dataNotif.filter((item) => item.idUserTo != undefined && item.idUserTo != null && item.idUserTo != "" && item.idUserTo != userId)
const pushNotif = dataPush.filter((item) => item.subscription != undefined)
const sendWebPush = await funSendWebPush({ sub: pushNotif, message: { title: 'Kegiatan Baru', body: 'Terdapat kegiatan baru. Silahkan periksa detailnya.' } })