fix(SW-614): move filtering logic to routes
This commit is contained in:
@@ -52,23 +52,34 @@ export const getUserTracking = cache(async function getMemoizedUserTracking() {
|
||||
|
||||
export const getHotelData = cache(async function getMemoizedHotelData(
|
||||
hotelId: string,
|
||||
language: string
|
||||
language: string,
|
||||
isCardOnlyPayment?: boolean
|
||||
) {
|
||||
return serverClient().hotel.hotelData.get({
|
||||
hotelId,
|
||||
language,
|
||||
isCardOnlyPayment,
|
||||
})
|
||||
})
|
||||
|
||||
export const getRoomAvailability = cache(
|
||||
async function getMemoizedRoomAvailability(
|
||||
hotelId: string,
|
||||
adults: number,
|
||||
roomStayStartDate: string,
|
||||
roomStayEndDate: string,
|
||||
children?: number,
|
||||
async function getMemoizedRoomAvailability({
|
||||
hotelId,
|
||||
adults,
|
||||
roomStayStartDate,
|
||||
roomStayEndDate,
|
||||
children,
|
||||
promotionCode,
|
||||
rateCode,
|
||||
}: {
|
||||
hotelId: string
|
||||
adults: number
|
||||
roomStayStartDate: string
|
||||
roomStayEndDate: string
|
||||
children?: number
|
||||
promotionCode?: string
|
||||
) {
|
||||
rateCode?: string
|
||||
}) {
|
||||
return serverClient().hotel.availability.rooms({
|
||||
hotelId: parseInt(hotelId),
|
||||
adults,
|
||||
@@ -76,6 +87,7 @@ export const getRoomAvailability = cache(
|
||||
roomStayEndDate,
|
||||
children,
|
||||
promotionCode,
|
||||
rateCode,
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user