feat: SW-1588 Implemented booking code select-rate

This commit is contained in:
Hrishikesh Vaipurkar
2025-02-14 20:50:42 +01:00
parent 832b6c27e0
commit 8966e56820
28 changed files with 242 additions and 60 deletions

View File

@@ -70,6 +70,7 @@ import type { HotelDataWithUrl } from "@/types/hotel"
import type {
HotelsAvailabilityInputSchema,
HotelsByHotelIdsAvailabilityInputSchema,
RoomsAvailabilityInputSchema,
} from "@/types/trpc/routers/hotel/availability"
import type { HotelInput } from "@/types/trpc/routers/hotel/hotel"
import type { CityLocation } from "@/types/trpc/routers/hotel/locations"
@@ -801,6 +802,8 @@ export const hotelQueryRouter = router({
})
const bookingCodeAvailabilityResponse =
await getHotelsAvailabilityByCity(input, apiLang, ctx.serviceToken)
// If API or network failed with no response
if (!bookingCodeAvailabilityResponse) {
metrics.hotelsAvailabilityBookingCode.fail.add(1, {
...input,