Fix workspace/user deletion (#2648)

* Fix workspace/user deletion

* remove logs

* add defaultWorkspace check
This commit is contained in:
Weiko
2023-11-22 17:12:46 +01:00
committed by GitHub
parent ac2fedb148
commit ccaa96bc58
12 changed files with 90 additions and 19 deletions

View File

@ -159,10 +159,18 @@ export class AuthService {
assert(user, "This user doesn't exist", NotFoundException);
assert(
user.defaultWorkspace,
'User has no default workspace',
NotFoundException,
);
// passwordHash is hidden for security reasons
user.passwordHash = '';
user.workspaceMember = await this.userService.loadWorkspaceMember(user);
console.log(user.workspaceMember);
const accessToken = await this.tokenService.generateAccessToken(user.id);
const refreshToken = await this.tokenService.generateRefreshToken(user.id);