mirror of
https://github.com/docmost/docmost.git
synced 2025-11-22 04:01:12 +10:00
fix workspace setup
This commit is contained in:
@ -5,15 +5,11 @@ import { PaginationMetaDto } from '../../../helpers/pagination/pagination-meta-d
|
||||
import { PaginatedResult } from '../../../helpers/pagination/paginated-result';
|
||||
import { UserRole } from '../../../helpers/types/permission';
|
||||
import { UserRepo } from '@docmost/db/repos/user/user.repo';
|
||||
import { WorkspaceRepo } from '@docmost/db/repos/workspace/workspace.repo';
|
||||
import { User } from '@docmost/db/types/entity.types';
|
||||
|
||||
@Injectable()
|
||||
export class WorkspaceUserService {
|
||||
constructor(
|
||||
private workspaceRepo: WorkspaceRepo,
|
||||
private userRepo: UserRepo,
|
||||
) {}
|
||||
constructor(private userRepo: UserRepo) {}
|
||||
|
||||
async getWorkspaceUsers(
|
||||
workspaceId: string,
|
||||
|
||||
@ -78,9 +78,8 @@ export class WorkspaceService {
|
||||
.execute();
|
||||
|
||||
// add user to default group
|
||||
await this.groupUserService.addUserToGroup(
|
||||
await this.groupUserService.addUserToDefaultGroup(
|
||||
user.id,
|
||||
group.id,
|
||||
workspace.id,
|
||||
trx,
|
||||
);
|
||||
@ -124,6 +123,7 @@ export class WorkspaceService {
|
||||
workspace.id,
|
||||
trx,
|
||||
);
|
||||
|
||||
return workspace;
|
||||
},
|
||||
trx,
|
||||
|
||||
Reference in New Issue
Block a user