refactor: clean code

This commit is contained in:
2024-08-24 04:28:53 +03:00
parent b215d8909c
commit eada16110b
4 changed files with 24 additions and 16 deletions

View File

@ -40,11 +40,11 @@ export class LoginComponent {
protected loginButtonIsDisable: boolean = true;
protected errorText: string = '';
constructor(private formBuilder: FormBuilder, private auth: AuthApiService, private route: Router) {
constructor(private formBuilder: FormBuilder, private auth: AuthApiService, private router: Router) {
this.auth.getRole()
.subscribe(data => {
if (data !== null)
route.navigate(['admin']).then();
router.navigate(['admin']).then();
});
this.loginForm = this.formBuilder.group({
@ -89,7 +89,7 @@ export class LoginComponent {
.subscribe(_ => {
this.loaderActive = false;
this.errorText = '';
this.route.navigate(['admin']).then();
this.router.navigate(['admin']).then();
});
}
}