File tree Expand file tree Collapse file tree
src/app/modules/auth/pages/log-in-page Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { Router } from '@angular/router';
88import { UtilsService } from '~shared/services/utils.service' ;
99
1010export enum UserLoginError {
11- BAD_USER_INPUT = 'BAD_USER_INPUT' ,
11+ BAD_CREDENTIALS = 11000 ,
1212}
1313
1414@Component ( {
@@ -62,7 +62,7 @@ export class LogInPageComponent {
6262 this . authService . logIn ( formValue . email , formValue . password ) . subscribe ( ( response : any ) => {
6363 if ( ! response . errors ) {
6464 this . router . navigate ( [ RoutesConfig . routes . hero . myHeroes ] ) ;
65- } else if ( response . errors [ 0 ] . extensions ?. code === UserLoginError . BAD_USER_INPUT ) {
65+ } else if ( response . errors [ 0 ] . code === UserLoginError . BAD_CREDENTIALS ) {
6666 this . utilsService . showSnackBar ( 'Bad credentials!' , 'info-snack-bar' ) ;
6767 }
6868 } ) ;
You can’t perform that action at this time.
0 commit comments