mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* refactor: handleNewBooking #3 * refactor: create booking factor * refactor: handleNewBooking * refactor: seats and rescheduleUId * chore: remove comment * fix: type err * chore: add missing statement * chore: use less params and other improvements * chore: name * chore: improvement * fix: type err * Typo fix * chore: fix type err * refactor: more readable * refactor: improve code * fix: conflicts --------- Co-authored-by: Joe Au-Yeung <[email protected]> Co-authored-by: Joe Au-Yeung <[email protected]> Co-authored-by: Syed Ali Shahbaz <[email protected]>
17 lines
420 B
TypeScript
17 lines
420 B
TypeScript
import prisma from "@calcom/prisma";
|
|
|
|
import type { BookingSeat } from "../handleSeats/types";
|
|
|
|
export const getSeatedBooking = async (bookingSeatUid: string): Promise<BookingSeat | null> => {
|
|
// rescheduleUid can be bookingUid and bookingSeatUid
|
|
return prisma.bookingSeat.findUnique({
|
|
where: {
|
|
referenceUid: bookingSeatUid,
|
|
},
|
|
include: {
|
|
booking: true,
|
|
attendee: true,
|
|
},
|
|
});
|
|
};
|