Scheduling infrastructure for absolutely everyone.
Update pages/api/availability/_get.ts
Agusti Fernandez Pardo2263e042173e
diff --git a/pages/api/availability/_get.ts b/pages/api/availability/_get.tsindex 4d6d3559b13..85e198feb06 100644--- a/pages/api/availability/_get.ts+++ b/pages/api/availability/_get.ts@@ -31,7 +31,7 @@ async function handler(req: NextApiRequest) {eventTypeId,userId,});- const team = await prisma.team.findUnique({ where: { id: teamId }, select: { members: true } });+ const team = await prisma.team.findUnique({ where: { id: teamId }, select: { members: { select: availabilityUserSelect } } });if (!team) throw new HttpError({ statusCode: 404, message: "teamId not found" });if (!team.members) throw new HttpError({ statusCode: 404, message: "teamId not found" });if (!isAdmin) throw new HttpError({ statusCode: 401, message: "Unauthorized" });