feat: add Request.purchaseOrderId (nullable FK)

This commit is contained in:
toanhoang
2026-08-02 20:24:59 -04:00
parent 3dd1b22828
commit 65232fc62c
5 changed files with 158 additions and 18 deletions
+2 -2
View File
@@ -24,8 +24,8 @@ export async function POST(request: Request): Promise<NextResponse> {
return NextResponse.json({ error: "Request body must be a JSON object" }, { status: 400 });
}
const { employee_id, type, reason } = body as Record<string, unknown>;
const validation = validateCreateRequestInput({ employee_id, type, reason });
const { employee_id, type, reason, purchase_order_id } = body as Record<string, unknown>;
const validation = validateCreateRequestInput({ employee_id, type, reason, purchase_order_id });
if (!validation.ok) {
return NextResponse.json({ error: validation.error }, { status: 400 });