This commit is contained in:
2023-05-05 11:37:52 +02:00
parent d072dca42c
commit b7aca11a38
3 changed files with 11 additions and 4 deletions

View File

@@ -46,7 +46,7 @@ export class LoginComponent implements OnInit {
this.newUser.password = createUser.password;
this.userService.createUser(this.newUser).subscribe(user => {
this.cookieService.setUsername(createUser.username);
this.router.navigate(['/management']);
this.router.navigate(['/home']);
});
});
}
@@ -55,7 +55,7 @@ export class LoginComponent implements OnInit {
this.userService.getUser(username).subscribe(user => {
if (user.password == password) {
this.cookieService.setUsername(username);
this.router.navigate(['/management']);
this.router.navigate(['/home']);
} else {
this.errorLogin = true;
}