Fix: Login deleting old clients was conflicting with login history
Chore: Moved to angular linting using the recommended plugins / settings
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { inject, TestBed } from '@angular/core/testing';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { inject, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AuthService } from './auth.service';
|
||||
|
||||
|
||||
@ -12,8 +12,8 @@ const JWT_USER = 'JWT_USER';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class AuthService {
|
||||
private currentUserSubject: BehaviorSubject<User | null> = new BehaviorSubject<User | null>(null);
|
||||
public currentUser: Observable<User | null>;
|
||||
private currentUserSubject: BehaviorSubject<User | null> = new BehaviorSubject<User | null>(null);
|
||||
|
||||
constructor(private http: HttpClient) {
|
||||
this.checkStorage();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
|
||||
import { LoginComponent } from './login.component';
|
||||
|
||||
@ -42,7 +42,9 @@ export class LoginComponent implements OnInit, AfterViewInit {
|
||||
|
||||
ngAfterViewInit() {
|
||||
setTimeout(() => {
|
||||
if (this.nameElement) this.nameElement.nativeElement.focus();
|
||||
if (this.nameElement) {
|
||||
this.nameElement.nativeElement.focus();
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
|
||||
import { LogoutComponent } from './logout.component';
|
||||
|
||||
Reference in New Issue
Block a user