Merged in fix/unify-gethotel-input (pull request #1319)

feat: getHotel - unify input to make sure we can use the same cache response

* feat: getHotel - unify input to make sure we can use the same cache response


Approved-by: Simon.Emanuelsson
This commit is contained in:
Linus Flood
2025-02-12 11:35:39 +00:00
parent ea9d68a191
commit 019a5db549
5 changed files with 8 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ export const ratesInputSchema = z.object({
export const hotelInputSchema = z.object({
hotelId: z.string(),
isCardOnlyPayment: z.boolean().default(false),
isCardOnlyPayment: z.boolean(),
language: z.nativeEnum(Lang),
})

View File

@@ -493,7 +493,10 @@ export async function getHotelListData(
const hotels = await Promise.all(
hotelIds.map(async (hotelId) => {
const [hotelData, url] = await Promise.all([
getHotel({ hotelId, language: lang }, serviceToken),
getHotel(
{ hotelId, language: lang, isCardOnlyPayment: false },
serviceToken
),
getHotelPageUrl(lang, hotelId),
])