import { apiFetch, jsonResponse } from '../../../_lib/api'; export const dynamic = 'force-dynamic'; export async function GET(): Promise { const res = await apiFetch('/admin/events'); const body = await res.json(); return jsonResponse(body, res.status); } export async function POST(request: Request): Promise { const body = await request.json(); const res = await apiFetch('/admin/events', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body), }); const resBody = await res.json(); return jsonResponse(resBody, res.status); }