formation 4 years ago
parent
commit
525da65237

+ 4 - 4
angular-client/src/app/components/login/login.component.ts

@@ -73,14 +73,14 @@ export class LoginComponent implements OnInit {
    this.authService.signIn(this.formGroup.value).subscribe(
     data => {
         // this.router.navigate([this.returnUrl]);
-        console.log(data);
+        console.log(data)
         this.loading = false;
-        this.router.navigate(['auth']);
+        this.router.navigate(['/auth']);
     },
     err => {
         this.loading = false;
-        console.log(err.error.message);
-        this.authService.openSnackBar(err.error.message);
+        console.log(err.error.message)
+        this.authService.openSnackBar(err.error.message)
     });
     // this.router.navigate(['/']);
 

+ 1 - 1
angular-client/src/app/components/register/register.component.ts

@@ -145,7 +145,7 @@ export class RegisterComponent implements OnInit {
         // this.router.navigate([this.returnUrl]);
         console.log(data)
         this.loading = false;
-        this.router.navigate(['auth']);
+        this.router.navigate(['/auth']);
     },
     err => {
         this.loading = false;