fix: stat should not count user with system role
This commit is contained in:
parent
bae9615bd8
commit
a028d8f9b3
1 changed files with 5 additions and 0 deletions
|
|
@ -172,6 +172,11 @@ export class UserController extends Controller {
|
|||
const list = await prisma.user.groupBy({
|
||||
by: "userType",
|
||||
_count: true,
|
||||
where: {
|
||||
AND: {
|
||||
userRole: { not: "system" },
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return list.reduce<Record<UserType, number>>(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue