perf: Move query to get just the user email to the main get query (#11230)

This commit is contained in:
Alex van Andel authored and GitHub committed 2023-09-08 08:39:29 -03:00
1 parent 3132c64205
commit 4ef52aa2c6
3 files changed
+5 -12

No files matched your search

+1 -2
View File
@@ -3,6 +3,7 @@ import { Prisma } from "@prisma/client";
export const availabilityUserSelect = Prisma.validator<Prisma.UserSelect>()({
id: true,
timeZone: true,
email: true,
bufferTime: true,
startTime: true,
username: true,
@@ -22,7 +23,6 @@ export const availabilityUserSelect = Prisma.validator<Prisma.UserSelect>()({
});
export const baseUserSelect = Prisma.validator<Prisma.UserSelect>()({
email: true,
name: true,
destinationCalendar: true,
locale: true,
@@ -35,7 +35,6 @@ export const baseUserSelect = Prisma.validator<Prisma.UserSelect>()({
export const userSelect = Prisma.validator<Prisma.UserArgs>()({
select: {
email: true,
name: true,
allowDynamicBooking: true,
destinationCalendar: true,