From 41fafb9e5e22a31518786e9e6f9bbac6b1161949 Mon Sep 17 00:00:00 2001 From: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> Date: Thu, 24 Apr 2025 18:03:20 +0530 Subject: [PATCH] fix: Include ordered attendees in booking select query (#20935) * fix: correct ordering * another --- packages/features/bookings/lib/getUserBooking.ts | 3 +++ packages/prisma/selects/booking.ts | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/features/bookings/lib/getUserBooking.ts b/packages/features/bookings/lib/getUserBooking.ts index edb1962a4f..d27dbb85de 100644 --- a/packages/features/bookings/lib/getUserBooking.ts +++ b/packages/features/bookings/lib/getUserBooking.ts @@ -42,6 +42,9 @@ const getUserBooking = async (uid: string) => { timeZone: true, phoneNumber: true, }, + orderBy: { + id: "asc", + }, }, eventTypeId: true, eventType: { diff --git a/packages/prisma/selects/booking.ts b/packages/prisma/selects/booking.ts index 9615a17c55..b7a1f0eeb5 100644 --- a/packages/prisma/selects/booking.ts +++ b/packages/prisma/selects/booking.ts @@ -8,6 +8,10 @@ export const bookingMinimalSelect = Prisma.validator()({ customInputs: true, startTime: true, endTime: true, - attendees: true, + attendees: { + orderBy: { + id: "asc", + }, + }, metadata: true, });