import { jsonResponse, memberApiFetch } from '../../../../../_lib/api'; export const dynamic = 'force-dynamic'; export async function POST( request: Request, { params }: { params: Promise<{ id: string }> }, ): Promise { const { id } = await params; const body = await request.json(); const res = await memberApiFetch(`/my/events/${id}/rsvp`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body), }); const resBody = await res.json(); return jsonResponse(resBody, res.status); }