Merged in fix/cache-breakfast-package (pull request #1664)

Fix(breakfast): added hotelId to cache key for breakfast package

* Fix(breakfast): added hotelId to cache key for breakfast package


Approved-by: Joakim Jäderberg
This commit is contained in:
Linus Flood
2025-03-31 13:29:39 +00:00
parent 5cff2e5f36
commit 367969a1b9

View File

@@ -1358,7 +1358,7 @@ export const hotelQueryRouter = router({
const lang = input.lang ?? ctx.lang
const cacheClient = await getCacheClient()
return await cacheClient.cacheOrGet(
`${ctx.lang}:getLocations`,
`${lang}:getLocations`,
async () => {
const countries = await getCountries({
lang: lang,
@@ -1704,7 +1704,7 @@ export const hotelQueryRouter = router({
const cacheClient = await getCacheClient()
const breakfastPackages = await cacheClient.cacheOrGet(
`${apiLang}:adults${input.adults}:startDate:${params.StartDate}:endDate:${params.EndDate}`,
`${apiLang}:adults${input.adults}:startDate:${params.StartDate}:endDate:${params.EndDate}:hotel:${input.hotelId}`,
async () => {
const apiResponse = await api.get(
api.endpoints.v1.Package.Breakfast.hotel(input.hotelId),