refactor: clean code
This commit is contained in:
@ -11,7 +11,7 @@ import {FocusNextDirective} from "@/directives/focus-next.directive";
|
||||
import {DataSpinnerComponent} from "@component/common/data-spinner/data-spinner.component";
|
||||
import AuthApiService from "@api/v1/authApiService";
|
||||
import {Router} from "@angular/router";
|
||||
import {catchError, of} from "rxjs";
|
||||
import {catchError} from "rxjs";
|
||||
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
@ -43,7 +43,7 @@ export class LoginComponent {
|
||||
constructor(private formBuilder: FormBuilder, private auth: AuthApiService, private route: Router) {
|
||||
this.auth.getRole()
|
||||
.subscribe(data => {
|
||||
if (data != null)
|
||||
if (data !== null)
|
||||
route.navigate(['admin']).then();
|
||||
});
|
||||
|
||||
|
@ -29,7 +29,7 @@ export class WelcomeComponent {
|
||||
Validators.minLength(16)
|
||||
]);
|
||||
|
||||
protected apiToGetToken : string = environment.apiUrl;
|
||||
protected apiToGetToken: string = environment.apiUrl;
|
||||
|
||||
constructor(private navigationService: NavigationService, private api: SetupService) {
|
||||
this.apiToGetToken += AvailableVersion[this.api.version];
|
||||
|
Reference in New Issue
Block a user