mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-27 13:24:53 +00:00
Add user active check and improve error handling in auth services
This commit is contained in:
@ -45,6 +45,9 @@ export class AuthService {
|
||||
if (!user.isUserVerified) {
|
||||
throw new BadRequestException('User is not verified');
|
||||
}
|
||||
if (!user.isActive) {
|
||||
throw new BadRequestException('User is not active');
|
||||
}
|
||||
if (user) {
|
||||
const passwordMatch = this.helperHashService.bcryptCompare(
|
||||
pass,
|
||||
|
||||
Reference in New Issue
Block a user