import { acceptContract, performAction } from '@/lib/game/actions'; // POST /api/contracts/:id/accept (v0.8.0) — claim an open contract: status flips // open → accepted. 404 unknown id; 409 if the contract is not 'open' (accepted / // completed / expired). No body. On success returns the full state snapshot. export async function POST(_req: Request, ctx: { params: Promise<{ id: string }> }) { const { id } = await ctx.params; return performAction((inst) => acceptContract(inst, id)); }