From 07ab3fc29e02f1d380e28cedf757296376ebad58 Mon Sep 17 00:00:00 2001 From: Niclas Edenvin Date: Thu, 3 Apr 2025 12:51:15 +0000 Subject: [PATCH] Merged in fix/sw-2125-scandic-go-breakfast (pull request #1726) fix(sw-2125): breakfast validation was wrong on Scandic Go Approved-by: Bianca Widstam --- apps/scandic-web/server/routers/hotels/output.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/scandic-web/server/routers/hotels/output.ts b/apps/scandic-web/server/routers/hotels/output.ts index 14114c8f2..d4b23f992 100644 --- a/apps/scandic-web/server/routers/hotels/output.ts +++ b/apps/scandic-web/server/routers/hotels/output.ts @@ -542,10 +542,12 @@ export const locationsSchema = z.object({ export const breakfastPackagesSchema = z .object({ data: z.object({ - attributes: z.object({ - hotelId: z.number(), - packages: z.array(breakfastPackageSchema), - }), + attributes: z + .object({ + hotelId: z.number(), + packages: z.array(breakfastPackageSchema), + }) + .or(z.object({ packages: z.tuple([]) })), type: z.literal("breakfastpackage"), }), })