From 367969a1b927d0f73e5b1de6a31138c4d11f5630 Mon Sep 17 00:00:00 2001 From: Linus Flood Date: Mon, 31 Mar 2025 13:29:39 +0000 Subject: [PATCH] Merged in fix/cache-breakfast-package (pull request #1664) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- apps/scandic-web/server/routers/hotels/query.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/scandic-web/server/routers/hotels/query.ts b/apps/scandic-web/server/routers/hotels/query.ts index d0a72b453..d10ea4bba 100644 --- a/apps/scandic-web/server/routers/hotels/query.ts +++ b/apps/scandic-web/server/routers/hotels/query.ts @@ -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),