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