Merged in revert-pr-1925 (pull request #1927)
Revert "Feat/sw 2323 find booking (pull request #1925)" Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { getHotel as _getHotel } from "@/server/routers/hotels/utils"
|
||||
import { isDefined } from "@/server/utils"
|
||||
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
@@ -18,6 +17,7 @@ import type {
|
||||
HotelInput,
|
||||
} from "@/types/trpc/routers/hotel/hotel"
|
||||
import type { Lang } from "@/constants/languages"
|
||||
import type { LinkedReservationsInput } from "@/server/routers/booking/input"
|
||||
import type { GetHotelsByCSFilterInput } from "@/server/routers/hotels/input"
|
||||
import type { GetSavedPaymentCardsInput } from "@/server/routers/user/input"
|
||||
|
||||
@@ -136,34 +136,14 @@ export const getPackages = cache(async function getMemoizedPackages(
|
||||
})
|
||||
|
||||
export const getBookingConfirmation = cache(
|
||||
async function getMemoizedBookingConfirmation(refId: string, lang: Lang) {
|
||||
return serverClient().booking.confirmation({
|
||||
refId,
|
||||
lang,
|
||||
})
|
||||
async function getMemoizedBookingConfirmation(confirmationNumber: string) {
|
||||
return serverClient().booking.get({ confirmationNumber })
|
||||
}
|
||||
)
|
||||
|
||||
export const findBooking = cache(async function getMemoizedFindBooking(
|
||||
confirmationNumber: string,
|
||||
lastName: string,
|
||||
firstName: string,
|
||||
email: string
|
||||
) {
|
||||
return serverClient().booking.findBooking({
|
||||
confirmationNumber,
|
||||
lastName,
|
||||
firstName,
|
||||
email,
|
||||
})
|
||||
})
|
||||
|
||||
export const getLinkedReservations = cache(
|
||||
async function getMemoizedLinkedReservations(refId: string, lang: Lang) {
|
||||
return serverClient().booking.linkedReservations({
|
||||
refId,
|
||||
lang,
|
||||
})
|
||||
async function getMemoizedLinkedReservations(input: LinkedReservationsInput) {
|
||||
return serverClient().booking.linkedReservations(input)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user