mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 10:24:53 +00:00
Merge pull request #77 from SyncrowIOT/SP-342-implement-region-end-point-in-the-login
error handling for login
This commit is contained in:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user