From 0fd6bed813c2ece99fea52b0a858e31867322a23 Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Tue, 17 Oct 2023 12:29:21 +0100 Subject: [PATCH] chore: Remove users from getSchedule return (#11940) --- packages/trpc/server/routers/viewer/slots/util.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/trpc/server/routers/viewer/slots/util.ts b/packages/trpc/server/routers/viewer/slots/util.ts index b49412eebf..6b9cc9abfe 100644 --- a/packages/trpc/server/routers/viewer/slots/util.ts +++ b/packages/trpc/server/routers/viewer/slots/util.ts @@ -567,7 +567,7 @@ export async function getAvailableSlots({ input, ctx }: GetScheduleOptions) { const computedAvailableSlots = availableTimeSlots.reduce( ( - r: Record, + r: Record, { time, ...passThroughProps } ) => { // TODO: Adds unit tests to prevent regressions in getSchedule (try multiple timezones) @@ -580,13 +580,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: