Files
hipmi/src/app/api/event/check-kehadiran/route.ts
Bagasbanuna02 2feb461c5b fix ( event )
deskripsi:
- fix API detail dan pindah list peserta ke halaman beebeda
2025-01-20 15:49:00 +08:00

24 lines
647 B
TypeScript

import { event_funCheckKehadiran } from "@/app_modules/event/fun";
import { NextResponse } from "next/server";
export async function GET(request: Request) {
const method = request.method;
if (method !== "GET") {
return NextResponse.json(
{ success: false, message: "Method not allowed" },
{ status: 405 }
);
}
const { searchParams } = new URL(request.url);
const userId = searchParams.get("userId");
const eventId = searchParams.get("eventId");
const res = await event_funCheckKehadiran({
eventId: eventId as string,
userId: userId as string,
});
return NextResponse.json(res, { status: 200 });
}