perf: Removed the users data from the getSchedule response
parent
20282a16f7
commit
f3c3396f87
|
@ -566,13 +566,6 @@ export async function getAvailableSlots({ input, ctx }: GetScheduleOptions) {
|
||||||
r[dateString].push({
|
r[dateString].push({
|
||||||
...passThroughProps,
|
...passThroughProps,
|
||||||
time: time.toISOString(),
|
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
|
// 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()) && {
|
...(currentSeats?.some((booking) => booking.startTime.toISOString() === time.toISOString()) && {
|
||||||
attendees:
|
attendees:
|
||||||
|
|
Loading…
Reference in New Issue