Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

property success does not exist in type Response #10

Open
1jayanth opened this issue Jul 21, 2018 · 0 comments
Open

property success does not exist in type Response #10

1jayanth opened this issue Jul 21, 2018 · 0 comments

Comments

@1jayanth
Copy link

1jayanth commented Jul 21, 2018

this.authService.authenticateUser(user).subscribe(data => {
if (data.success){
this.authService.storeUserData(data.token, data.user);
this.flashMessages.show('You are now logged in',{ cssClass: 'alert-success', timeout:5000});
this.router.navigate(['/dashboard']);
} else {
this.flashMessages.show(data.msg, { cssClass: 'alert-danger', timeout:5000});
this.router.navigate(['/login']);
}

 });

i later changed it to
if (data['success']){.............
but while login it is going to dashboard even if the password or username is wrong...

nodejs 10.5.0
angular2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant