fix : firebase notification
Deskripsi: - empty array token undefined > semua fitur - update api version No Issues
This commit is contained in:
@@ -263,7 +263,7 @@ export async function POST(request: Request) {
|
||||
data: dataNotifFilter
|
||||
})
|
||||
|
||||
const tokenUnique = [...new Set(tokenDup.flat())];
|
||||
const tokenUnique = [...new Set(tokenDup.flat())].filter((v: any) => v != undefined && v != null && v != "");
|
||||
await sendFCMNotificationMany({
|
||||
token: tokenUnique,
|
||||
title: "Pengumuman Baru",
|
||||
|
||||
@@ -103,7 +103,7 @@ export async function POST(request: Request, context: { params: { id: string } }
|
||||
tokenDup.push(perbekel?.TokenDeviceUser.map((v: any) => v.token).flat())
|
||||
}
|
||||
|
||||
const tokenUnique = [...new Set(tokenDup.flat())];
|
||||
const tokenUnique = [...new Set(tokenDup.flat())].filter((v: any) => v != undefined && v != null && v != "");
|
||||
await sendFCMNotificationMany({
|
||||
token: tokenUnique,
|
||||
title: "Komentar Baru",
|
||||
|
||||
@@ -215,7 +215,7 @@ export async function POST(request: Request) {
|
||||
data: dataNotif
|
||||
})
|
||||
|
||||
const tokenUnique = [...new Set(tokenDup.flat())];
|
||||
const tokenUnique = [...new Set(tokenDup.flat())].filter((v: any) => v != undefined && v != null && v != "");
|
||||
await sendFCMNotificationMany({
|
||||
token: tokenUnique,
|
||||
title: "Diskusi Umum Baru",
|
||||
|
||||
@@ -119,7 +119,7 @@ export async function POST(request: Request, context: { params: { id: string } }
|
||||
tokenDup.push(perbekel?.TokenDeviceUser.map((v: any) => v.token).flat())
|
||||
}
|
||||
|
||||
const tokenUnique = [...new Set(tokenDup.flat())];
|
||||
const tokenUnique = [...new Set(tokenDup.flat())].filter((v: any) => v != undefined && v != null && v != "");
|
||||
await sendFCMNotificationMany({
|
||||
token: tokenUnique,
|
||||
title: "Komentar Baru",
|
||||
|
||||
@@ -269,7 +269,7 @@ export async function POST(request: Request) {
|
||||
data: dataNotifFilter
|
||||
})
|
||||
|
||||
const tokenUnique = [...new Set(tokenDup.flat())];
|
||||
const tokenUnique = [...new Set(tokenDup.flat())].filter((v: any) => v != undefined && v != null && v != "");
|
||||
|
||||
await sendFCMNotificationMany({
|
||||
token: tokenUnique,
|
||||
|
||||
@@ -392,7 +392,7 @@ export async function POST(request: Request) {
|
||||
data: dataNotifFilter
|
||||
})
|
||||
|
||||
const tokenUnique = [...new Set(tokenDup.flat())];
|
||||
const tokenUnique = [...new Set(tokenDup.flat())].filter((v: any) => v != undefined && v != null && v != "");
|
||||
await sendFCMNotificationMany({
|
||||
token: tokenUnique,
|
||||
title: "Kegiatan Baru",
|
||||
|
||||
@@ -363,7 +363,7 @@ export async function POST(request: Request) {
|
||||
data: dataNotifFilter
|
||||
})
|
||||
|
||||
const tokenUnique = [...new Set(tokenDup.flat())];
|
||||
const tokenUnique = [...new Set(tokenDup.flat())].filter((v: any) => v != undefined && v != null && v != "");
|
||||
await sendFCMNotificationMany({
|
||||
token: tokenUnique,
|
||||
title: "Tugas Baru",
|
||||
|
||||
Reference in New Issue
Block a user