fix: instant booking location lookup (#27517)

Use booking uid instead of numeric id for instant booking location
  endpoint, aligning with existing booking endpoint patterns
This commit is contained in:
Pedro Castro authored and GitHub committed 2026-02-02 14:19:52 -03:00
1 parent c43c48b1a8
commit 1ff307bb44
3 files changed
+13 -13

No files matched your search

@@ -12,11 +12,11 @@ type GetOptions = {
export const getHandler = async ({ ctx, input }: GetOptions) => {
const { prisma } = ctx;
const { bookingId } = input;
const { bookingUid } = input;
const booking = await prisma.booking.findUnique({
where: {
id: bookingId,
uid: bookingUid,
status: BookingStatus.ACCEPTED,
},
select: {
@@ -1,9 +1,9 @@
import { z } from "zod";
export type TInstantBookingInputSchema = {
bookingId: number;
bookingUid: string;
};
export const ZInstantBookingInputSchema: z.ZodType<TInstantBookingInputSchema> = z.object({
bookingId: z.number(),
bookingUid: z.string(),
});