fix: team switching

This commit is contained in:
Andras Bacsai
2022-08-26 18:44:51 +00:00
parent 4c5e71f33c
commit 570b286ef9
2 changed files with 29 additions and 21 deletions

View File

@@ -160,6 +160,7 @@ export async function getTeam(request: FastifyRequest<OnlyId>, reply: FastifyRep
const invitations = await prisma.teamInvitation.findMany({ where: { teamId: team.id } });
const { teams } = await prisma.user.findUnique({ where: { id: userId }, include: { teams: true } })
return {
currentTeam: teamId,
team,
teams,
permissions,