fix: unbreak toApiLang call that failed everytime

This commit is contained in:
Simon Emanuelsson
2025-04-03 09:16:15 +02:00
committed by Michael Zetterberg
parent 30c7eb07fa
commit 6d869ceba7
7 changed files with 23 additions and 20 deletions

View File

@@ -705,9 +705,10 @@ export const hotelQueryRouter = router({
})
})
.query(async ({ input, ctx }) => {
const lang = toApiLang(input.lang || ctx.lang)
let selectedRoomData = await getSelectedRoomAvailability(
input,
toApiLang(ctx.lang),
lang,
ctx.token,
ctx.userPoints
)
@@ -718,7 +719,6 @@ export const hotelQueryRouter = router({
children,
counterRateCode,
hotelId,
inputLang,
roomStayEndDate,
roomStayStartDate,
roomTypeCode,
@@ -797,7 +797,7 @@ export const hotelQueryRouter = router({
{
hotelId,
isCardOnlyPayment: false,
language: inputLang ?? ctx.lang,
language: input.lang || ctx.lang,
},
ctx.serviceToken
)
@@ -884,7 +884,7 @@ export const hotelQueryRouter = router({
adults,
...(children && { children }),
...(bookingCode && { bookingCode }),
language: inputLang ?? ctx.lang,
language: lang,
},
},
})