perf: deduplicating DB fetches + leverage unique DB index for team type booking page (#21811)

* wip

* refactor

* refactor

* fix

* optimize

* better

* comment

* better code

* do not use cache for now

* simplify
This commit is contained in:
Benny Joo authored and GitHub committed 2025-06-18 09:53:04 +03:00
1 parent ddc5838c7b
commit 7900be3a30
3 files changed
+158 -116

No files matched your search

@@ -156,7 +156,7 @@ export const getBookingForReschedule = async (uid: string, userId?: number) => {
let attendeeEmail: string | null = null;
let bookingSeatData: { description?: string; responses: Prisma.JsonValue } | null = null;
if (!theBooking) {
const bookingSeat = await prisma.bookingSeat.findFirst({
const bookingSeat = await prisma.bookingSeat.findUnique({
where: {
referenceUid: uid,
},