mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 00:27:11 +01:00
Remove sensitive user information.
This commit is contained in:
parent
6d5aeb3bd1
commit
44e6bff6b1
3 changed files with 32 additions and 9 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { TeamWebsite, Prisma, Website, Team, User } from '@prisma/client';
|
||||
import { TeamWebsite, Prisma, Website, Team, User, TeamUser } from '@prisma/client';
|
||||
import { ROLES } from 'lib/constants';
|
||||
import { uuid } from 'lib/crypto';
|
||||
import prisma from 'lib/prisma';
|
||||
|
|
@ -38,9 +38,9 @@ export async function getTeamWebsiteByTeamMemberId(
|
|||
|
||||
export async function getTeamWebsites(teamId: string): Promise<
|
||||
(TeamWebsite & {
|
||||
team: Team;
|
||||
team: Team & { teamUser: TeamUser[] };
|
||||
website: Website & {
|
||||
user: User;
|
||||
user: { id: string; username: string };
|
||||
};
|
||||
})[]
|
||||
> {
|
||||
|
|
@ -60,7 +60,12 @@ export async function getTeamWebsites(teamId: string): Promise<
|
|||
},
|
||||
website: {
|
||||
include: {
|
||||
user: true,
|
||||
user: {
|
||||
select: {
|
||||
id: true,
|
||||
username: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue