Archived
Correction of the post login redirection.
This commit is contained in:
1 parent
65f0015cf1
commit
6dc8a6622e
1 file changed
+1
-1
@@ -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