fix(server): wrong member count query (#4506)

This commit is contained in:
liuyi
2023-09-26 10:36:08 -05:00
committed by LongYinan
parent a7e79c6c53
commit bd64ee3af0
4 changed files with 106 additions and 67 deletions
@@ -174,6 +174,9 @@ export class WorkspaceResolver {
return this.prisma.userWorkspacePermission.count({
where: {
workspaceId: workspace.id,
userId: {
not: null,
},
},
});
}
@@ -214,6 +217,9 @@ export class WorkspaceResolver {
const data = await this.prisma.userWorkspacePermission.findMany({
where: {
workspaceId: workspace.id,
userId: {
not: null,
},
},
skip,
take: take || 8,