#328493 Change message for "user already exists" error.
This commit is contained in:
Родитель
2d8e9bc4dd
Коммит
635e53f20f
|
@ -72,7 +72,14 @@ export class LoginComponent implements OnInit {
|
|||
this._alertsService.showSuccess('Welcome to TeamUP!');
|
||||
return this._usersService.login(this.user.Username, this.user.Password);
|
||||
})
|
||||
.catch((e) => e && this._alertsService.showError(e.message));
|
||||
.catch((err) => {
|
||||
if (err) {
|
||||
if (err.code === 201) {
|
||||
err.message = 'A user with the same email address already exists.';
|
||||
}
|
||||
this._alertsService.showError(err.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
resetPassword() {
|
||||
|
@ -89,10 +96,4 @@ export class LoginComponent implements OnInit {
|
|||
})
|
||||
.catch(err => err && this._alertsService.showError(err.message));
|
||||
}
|
||||
|
||||
private _getErrHandler() {
|
||||
return (err) => {
|
||||
this._alertsService.showError(err && err.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче