diff --git a/app/[lang]/(live)/(public)/hotelreservation/(standard)/step/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/(standard)/step/page.tsx index 63ec174a5..82feef50c 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/(standard)/step/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/(standard)/step/page.tsx @@ -216,11 +216,10 @@ export default async function StepPage({ roomPrice={roomPrice} otherPaymentOptions={ hotelData.data.attributes.merchantInformationData - ?.alternatePaymentOptions ?? [] + .alternatePaymentOptions } supportedCards={ - hotelData.data.attributes.merchantInformationData - ?.cards ?? [] + hotelData.data.attributes.merchantInformationData.cards } mustBeGuaranteed={mustBeGuaranteed} /> diff --git a/server/routers/hotels/output.ts b/server/routers/hotels/output.ts index aba2ecbb1..1bffd3543 100644 --- a/server/routers/hotels/output.ts +++ b/server/routers/hotels/output.ts @@ -470,7 +470,7 @@ export const hotelAttributesSchema = z.object({ isPublished: z.boolean(), keywords: z.array(z.string()), location: locationSchema, - merchantInformationData: merchantInformationSchema.optional(), + merchantInformationData: merchantInformationSchema, name: z.string(), operaId: z.string(), parking: z.array(parkingSchema), diff --git a/server/routers/hotels/query.ts b/server/routers/hotels/query.ts index 415677035..4b40ecc33 100644 --- a/server/routers/hotels/query.ts +++ b/server/routers/hotels/query.ts @@ -193,10 +193,8 @@ export const getHotelData = cache( const hotelData = validateHotelData.data if (isCardOnlyPayment) { - if (hotelData.data.attributes.merchantInformationData) { - hotelData.data.attributes.merchantInformationData.alternatePaymentOptions = - [] - } + hotelData.data.attributes.merchantInformationData.alternatePaymentOptions = + [] } if (hotelData.data.attributes.gallery) { const smallerImages = hotelData.data.attributes.gallery.smallerImages