import { NextResponse } from "next/server"; /** Standard success response: { ok: true, ...data } */ export function apiOk(data?: Record) { return NextResponse.json({ ok: true, ...data }); } /** Standard error response: { error: message } with given status */ export function apiError(message: string, status: number = 400) { return NextResponse.json({ error: message }, { status }); }