mirror of
https://github.com/docmost/docmost.git
synced 2025-11-22 04:41:08 +10:00
Use polymorphic table for space membership
This commit is contained in:
@ -89,12 +89,6 @@ export class GroupUserService {
|
||||
throw new NotFoundException('Group not found');
|
||||
}
|
||||
|
||||
const find = await manager.findOne(User, {
|
||||
where: { id: userId },
|
||||
});
|
||||
|
||||
console.log(find);
|
||||
|
||||
const userExists = await manager.exists(User, {
|
||||
where: { id: userId, workspaceId },
|
||||
});
|
||||
|
||||
@ -119,7 +119,7 @@ export class GroupService {
|
||||
.where('group.id = :groupId', { groupId })
|
||||
.andWhere('group.workspaceId = :workspaceId', { workspaceId })
|
||||
.loadRelationCountAndMap(
|
||||
'group.userCount',
|
||||
'group.memberCount',
|
||||
'group.groupUsers',
|
||||
'groupUsers',
|
||||
)
|
||||
@ -140,7 +140,7 @@ export class GroupService {
|
||||
.createQueryBuilder('group')
|
||||
.where('group.workspaceId = :workspaceId', { workspaceId })
|
||||
.loadRelationCountAndMap(
|
||||
'group.userCount',
|
||||
'group.memberCount',
|
||||
'group.groupUsers',
|
||||
'groupUsers',
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user