feat(SW-1710): add access checks to my stay page for viewing booking
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
} from "@/server/trpc"
|
||||
|
||||
import { getHotel } from "../hotels/query"
|
||||
import encryptValue from "../utils/encryptValue"
|
||||
import { encrypt } from "../utils/encryption"
|
||||
import {
|
||||
bookingConfirmationInput,
|
||||
createRefIdInput,
|
||||
@@ -241,8 +241,8 @@ export const bookingQueryRouter = router({
|
||||
createRefId: serviceProcedure
|
||||
.input(createRefIdInput)
|
||||
.mutation(async function ({ input }) {
|
||||
const { bookingNumber, lastName } = input
|
||||
const encryptedRefId = encryptValue(`${bookingNumber},${lastName}`)
|
||||
const { confirmationNumber, lastName } = input
|
||||
const encryptedRefId = encrypt(`${confirmationNumber},${lastName}`)
|
||||
|
||||
if (!encryptedRefId) {
|
||||
throw serverErrorByStatus(422, "Was not able to encrypt ref id")
|
||||
|
||||
Reference in New Issue
Block a user