Impersination backend
This commit is contained in:
@@ -35,7 +35,7 @@ export class AuthGuard implements CanActivate {
|
||||
if (payload.type != 'access') {
|
||||
throw new UnauthorizedException('wrong token');
|
||||
}
|
||||
const user = await this.authService.getUserById(payload.id);
|
||||
const user = await this.authService.getUserById(payload.id, true);
|
||||
if (!user.isActive) {
|
||||
throw new HttpException('not active', HttpStatus.FORBIDDEN);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user