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:
@@ -558,7 +558,8 @@ export async function getLocations({
|
||||
|
||||
export const getHotel = cache(
|
||||
async (input: HotelInput, serviceToken: string) => {
|
||||
const { hotelId, language, isCardOnlyPayment } = input
|
||||
const { language, isCardOnlyPayment } = input
|
||||
const hotelId = input.hotelId.trim()
|
||||
|
||||
const getHotelCounter = createCounter("hotel", "getHotel")
|
||||
const metricsGetHotel = getHotelCounter.init({
|
||||
@@ -572,7 +573,7 @@ export const getHotel = cache(
|
||||
const cacheClient = await getCacheClient()
|
||||
|
||||
const result = await cacheClient.cacheOrGet(
|
||||
`${input.language}:hotel:${input.hotelId}:${!!input.isCardOnlyPayment}`,
|
||||
`${language}:hotel:${hotelId}:${!!isCardOnlyPayment}`,
|
||||
async () => {
|
||||
/**
|
||||
* Since API expects the params appended and not just
|
||||
|
||||
Reference in New Issue
Block a user