mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
Remove sensitive user information.
This commit is contained in:
parent
6d5aeb3bd1
commit
44e6bff6b1
3 changed files with 32 additions and 9 deletions
|
|
@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue