refactor: clean code
This commit is contained in:
@ -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();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user