Skip to content

Commit 4176af7

Browse files
authored
fix: remove subject field from contact schema and update fetch URL for contact request
1 parent 15f214d commit 4176af7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

app/api/contact/route.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { NextResponse } from "next/server";
55
const ContactSchema = z.object({
66
name: z.string().trim().min(1),
77
email: z.string().trim().email(),
8-
subject: z.string().trim().min(1),
98
message: z.string().trim().min(1),
109
});
1110

@@ -45,7 +44,7 @@ export async function POST(req: NextRequest) {
4544
const timeout = setTimeout(() => controller.abort(), UPSTREAM_TIMEOUT_MS);
4645

4746
try {
48-
const upstream = await fetch(`${apiUrl}/contact`, {
47+
const upstream = await fetch(`${apiUrl}/contact/send`, {
4948
method: "POST",
5049
headers: {
5150
"Content-Type": "application/json",

0 commit comments

Comments
 (0)