Correction of the post login redirection.
This commit is contained in:
@@ -38,7 +38,7 @@ export class LoginComponent {
|
|||||||
this.loginService.login(this.model).subscribe((pUser: User) => {
|
this.loginService.login(this.model).subscribe((pUser: User) => {
|
||||||
console.log('Login success.');
|
console.log('Login success.');
|
||||||
this.authService.setAuthenticated(pUser);
|
this.authService.setAuthenticated(pUser);
|
||||||
this.router.navigate(['/home']);
|
this.router.navigate(['/myPosts']);
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
if (error.status === 401) {
|
if (error.status === 401) {
|
||||||
console.log('Login attempt failed.');
|
console.log('Login attempt failed.');
|
||||||
|
|||||||
Reference in New Issue
Block a user