Scheduling infrastructure for absolutely everyone.
chore: Remove users from getSchedule return (#11940)
Alex van Andel0fd6bed813c2
diff --git a/packages/trpc/server/routers/viewer/slots/util.ts b/packages/trpc/server/routers/viewer/slots/util.tsindex b49412eebf4..6b9cc9abfec 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<string, { time: string; users: string[]; attendees?: number; bookingUid?: string }[]>,+ r: Record<string, { time: string; attendees?: number; bookingUid?: string }[]>,{ 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: