From f3c3396f8710bce19cff9a66e2e65c1c4c06da9a Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Mon, 25 Sep 2023 18:28:53 -0300 Subject: [PATCH] perf: Removed the users data from the getSchedule response --- packages/trpc/server/routers/viewer/slots/util.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/trpc/server/routers/viewer/slots/util.ts b/packages/trpc/server/routers/viewer/slots/util.ts index 38062a6bc9..247557817a 100644 --- a/packages/trpc/server/routers/viewer/slots/util.ts +++ b/packages/trpc/server/routers/viewer/slots/util.ts @@ -566,13 +566,6 @@ export async function getAvailableSlots({ input, ctx }: GetScheduleOptions) { r[dateString].push({ ...passThroughProps, time: time.toISOString(), - users: (eventType.hosts - ? eventType.hosts.map((hostUserWithCredentials) => { - const { user } = hostUserWithCredentials; - return user; - }) - : eventType.users - ).map((user) => user.username || ""), // Conditionally add the attendees and booking id to slots object if there is already a booking during that time ...(currentSeats?.some((booking) => booking.startTime.toISOString() === time.toISOString()) && { attendees: