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) => {
|
||||
console.log('Login success.');
|
||||
this.authService.setAuthenticated(pUser);
|
||||
this.router.navigate(['/home']);
|
||||
this.router.navigate(['/myPosts']);
|
||||
}, (error) => {
|
||||
if (error.status === 401) {
|
||||
console.log('Login attempt failed.');
|
||||
|
||||
Reference in New Issue
Block a user