The open source coding agent.
TypeScript
Fix form submission
David Hill0fbedc5e195d
diff --git a/packages/console/app/src/routes/api/enterprise.ts b/packages/console/app/src/routes/api/enterprise.tsindex 6298ae349ce..d937be54302 100644--- a/packages/console/app/src/routes/api/enterprise.ts+++ b/packages/console/app/src/routes/api/enterprise.ts@@ -3,7 +3,6 @@ import { AWS } from "@opencode-ai/console-core/aws.js"interface EnterpriseFormData {name: string- company: stringrole: stringemail: stringmessage: string@@ -14,7 +13,7 @@ export async function POST(event: APIEvent) {const body = (await event.request.json()) as EnterpriseFormData// Validate required fields- if (!body.name || !body.company || !body.role || !body.email || !body.message) {+ if (!body.name || !body.role || !body.email || !body.message) {return Response.json({ error: "All fields are required" }, { status: 400 })}@@ -29,7 +28,6 @@ export async function POST(event: APIEvent) {New Enterprise InquiryName: ${body.name}-Company: ${body.company}Role: ${body.role}Email: ${body.email}@@ -40,7 +38,7 @@ ${body.message}// Send email using AWS SESawait AWS.sendEmail({to: "[email protected]",- subject: `Enterprise Inquiry from ${body.company}`,+ subject: `Enterprise Inquiry from ${body.name}`,body: emailContent,})