Merge pull request #77 from SyncrowIOT/SP-342-implement-region-end-point-in-the-login

error handling for login
This commit is contained in:
yousef-khriasat-uba
2024-08-11 15:40:30 +03:00
committed by GitHub

View File

@ -90,6 +90,7 @@ export class UserAuthService {
}
async userLogin(data: UserLoginDto) {
try {
const user = await this.authService.validateUser(
data.email,
data.password,
@ -123,6 +124,9 @@ export class UserAuthService {
}),
sessionId: session[1].uuid,
});
} catch (error) {
throw new BadRequestException('Wrong email, password or region');
}
}
async deleteUser(uuid: string) {