perf: Removed the users data from the getSchedule response

perf/get-schedule-payload-reduction
Keith Williams 2023-09-25 18:28:53 -03:00
parent 20282a16f7
commit f3c3396f87
1 changed files with 0 additions and 7 deletions

View File

@ -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: