perf: use isTeamBooking filter in all of Insights (#16561)

This commit is contained in:
Keith Williams authored and GitHub committed 2024-09-09 18:50:20 +00:00
1 parent 17201334b6
commit 71443ef23d
2 files changed
+28 -14

No files matched your search

@@ -102,12 +102,13 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
OR: [
{
teamId: team.id,
isTeamBooking: true,
},
{
userId: {
in: userIdsFromTeams,
},
teamId: null,
isTeamBooking: false,
},
],
createdAt: {
@@ -132,12 +133,13 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
OR: [
{
teamId: team.id,
isTeamBooking: true,
},
{
userId: {
in: userIdsFromTeams,
},
teamId: null,
isTeamBooking: false,
},
],
};