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

@@ -68,7 +68,7 @@ export const hotelPageSchema = z.object({
return { spaPage, activitiesCards }
}),
faq: hotelFaqSchema.nullable(),
hotel_page_id: z.string(),
hotel_page_id: z.string().transform((id) => id.trim()),
title: z.string(),
url: z.string(),
campaigns: z
@@ -148,7 +148,7 @@ export const hotelPageUrlsSchema = z
z
.object({
url: z.string(),
hotel_page_id: z.string(),
hotel_page_id: z.string().transform((id) => id.trim()),
system: systemSchema,
})
.transform((data) => {