upd: coba fcm server
This commit is contained in:
@@ -5,6 +5,7 @@ import _ from "lodash";
|
||||
import moment from "moment";
|
||||
import "moment/locale/id";
|
||||
import { NextResponse } from "next/server";
|
||||
import { sendFCMNotification } from "../../../../../xsend";
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
|
||||
@@ -99,6 +100,8 @@ export async function GET(request: Request) {
|
||||
createdAt: moment(v.createdAt).format("ll")
|
||||
}))
|
||||
|
||||
await sendFCMNotification('c89yuexsS_uc1tOErVPu5a:APA91bEb6tEKXAfReZjFVJ2mMyOzoW_RXryLSnSJTpbIVV3G0L_DCNkLuRvJ02Ip-Erz88QCQBAt-C2SN8eCRxu3-v1sBzXzKPtDv-huXpkjXsyrkifqvUo')
|
||||
|
||||
return NextResponse.json({ success: true, message: "Berhasil mendapatkan pengumuman", data: allData, }, { status: 200 });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
Reference in New Issue
Block a user