fix: Trimming hotel ids from contentstack to avoid 404 errors when fetching hotel data

Approved-by: Linus Flood
Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-09-12 09:18:50 +00:00
parent 15a352ea99
commit ce71fc421c
5 changed files with 20 additions and 16 deletions

View File

@@ -113,7 +113,10 @@ export const rawMetadataSchema = z.object({
)
.nullish(),
blocks: metaDataBlocksSchema,
hotel_page_id: z.string().nullish(),
hotel_page_id: z
.string()
.nullish()
.transform((id) => id?.trim() || null),
hotelData: hotelAttributesSchema
.pick({
name: true,