Skip to content

Commit 68fe0cc

Browse files
committed
Update CheckoutSchema: remove unused item id and fix email validation
1 parent 2c99575 commit 68fe0cc

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

pages/api/checkout.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
const CheckoutSchema = z.object({
1010
items: z.array(
1111
z.object({
12-
id: z.string(),
1312
quantity: z.number().min(1),
1413
name: z.string(),
1514
price: z.string(), // Changed to string to match expected type
@@ -18,7 +17,7 @@ const CheckoutSchema = z.object({
1817
}),
1918
),
2019
orderId: z.string(),
21-
email: z.string().email(),
20+
email: z.email(),
2221
});
2322

2423
export default async function handler(

0 commit comments

Comments
 (0)