fix(SW-769): removed categoryname enum from pointOfInterestSchema and use z.string() instead

This commit is contained in:
Erik Tiekstra
2024-11-19 09:50:34 +01:00
parent 3992529535
commit 1b3999a050
5 changed files with 26 additions and 64 deletions

View File

@@ -13,7 +13,6 @@ import { AlertTypeEnum } from "@/types/enums/alert"
import { CurrencyEnum } from "@/types/enums/currency"
import { FacilityEnum } from "@/types/enums/facilities"
import { PackageTypeEnum } from "@/types/enums/packages"
import { PointOfInterestCategoryNameEnum } from "@/types/hotel"
const ratingsSchema = z
.object({
@@ -199,14 +198,12 @@ const rewardNightSchema = z.object({
}),
})
const poiCategoryNames = z.nativeEnum(PointOfInterestCategoryNameEnum)
export const pointOfInterestSchema = z
.object({
name: z.string(),
distance: z.number(),
category: z.object({
name: poiCategoryNames,
name: z.string(),
group: z.string(),
}),
location: locationSchema,