mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 21:54:54 +00:00
Add UserRoleRepository and RoleTypeRepository imports
This commit is contained in:
@ -22,7 +22,9 @@ export class AuthService {
|
||||
where: {
|
||||
email,
|
||||
},
|
||||
relations: ['role.roleType'],
|
||||
});
|
||||
|
||||
if (!user.isUserVerified) {
|
||||
throw new BadRequestException('User is not verified');
|
||||
}
|
||||
@ -68,7 +70,9 @@ export class AuthService {
|
||||
uuid: user.uuid,
|
||||
type: user.type,
|
||||
sessionId: user.sessionId,
|
||||
roles: user.roles,
|
||||
};
|
||||
|
||||
const tokens = await this.getTokens(payload);
|
||||
await this.updateRefreshToken(user.uuid, tokens.refreshToken);
|
||||
return tokens;
|
||||
|
||||
Reference in New Issue
Block a user