Remove sensitive user information.
This commit is contained in:
1 parent
6d5aeb3bd1
commit
44e6bff6b1
3 files changed
+32
-9
No files matched your search
@@ -19,13 +19,20 @@ export async function getTeamUser(teamId: string, userId: string): Promise<TeamU
|
||||
});
|
||||
}
|
||||
|
||||
export async function getTeamUsers(teamId: string): Promise<TeamUser[]> {
|
||||
export async function getTeamUsers(
|
||||
teamId: string,
|
||||
): Promise<(TeamUser & { user: { id: string; username: string } })[]> {
|
||||
return prisma.client.teamUser.findMany({
|
||||
where: {
|
||||
teamId,
|
||||
},
|
||||
include: {
|
||||
user: true,
|
||||
user: {
|
||||
select: {
|
||||
id: true,
|
||||
username: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user