fix: rename BedTypeEnums

This commit is contained in:
Christel Westerberg
2024-11-06 13:08:15 +01:00
parent 6d051629d3
commit f4f771ec70
12 changed files with 68 additions and 72 deletions

View File

@@ -1,5 +1,7 @@
import { z } from "zod"
import { ChildBedTypeEnum } from "@/constants/booking"
const roomsSchema = z.array(
z.object({
adults: z.number().int().nonnegative(),
@@ -7,7 +9,7 @@ const roomsSchema = z.array(
.array(
z.object({
age: z.number().int().nonnegative(),
bedType: z.string(),
bedType: z.nativeEnum(ChildBedTypeEnum),
})
)
.default([]),