mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Add user role api.
This commit is contained in:
parent
78225691df
commit
8fc6e99aa8
3 changed files with 82 additions and 2 deletions
|
|
@ -21,6 +21,15 @@ export async function getUserRoles(where: Prisma.UserRoleWhereInput): Promise<Us
|
|||
});
|
||||
}
|
||||
|
||||
export async function getUserRolesByUserId(userId: string, teamId?: string): Promise<UserRole[]> {
|
||||
return prisma.client.userRole.findMany({
|
||||
where: {
|
||||
userId,
|
||||
teamId,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export async function updateUserRole(
|
||||
data: Prisma.UserRoleUpdateInput,
|
||||
where: Prisma.UserRoleWhereUniqueInput,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue