From 1fc376c51a508a61a872483c7c04856b8377649c Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Tue, 22 Oct 2024 18:35:55 +0530 Subject: [PATCH] fix: slots troubleshooter data (#17217) * Fix troubleshooter data slots * Remove email --------- Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> --- packages/trpc/server/routers/viewer/slots/util.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/trpc/server/routers/viewer/slots/util.ts b/packages/trpc/server/routers/viewer/slots/util.ts index 77ef2a8b98..3cce8a2ceb 100644 --- a/packages/trpc/server/routers/viewer/slots/util.ts +++ b/packages/trpc/server/routers/viewer/slots/util.ts @@ -924,17 +924,16 @@ export async function getAvailableSlots({ input, ctx }: GetScheduleOptions): Pro troubleshooter: { // One that Salesforce asked for askedContactOwner: contactOwnerEmailFromInput, - // One that we used as per Routing - usedContactOwner: contactOwnerEmail, - routedHosts: routedHostsWithContactOwnerAndFixedHosts.map((host) => { + // One that we used as per Routing skipContactOwner flag + consideredContactOwner: contactOwnerEmail, + // All hosts that have been checked for availability. If no routedTeamMemberIds are provided, this will be same as hosts. + routedHosts: usersWithCredentials.map((user) => { return { - email: host.email, - user: host.user.id, + userId: user.id, }; }), hosts: eventHosts.map((host) => ({ - email: host.email, - user: host.user.id, + userId: host.user.id, })), }, }