[ADF-3593] remove rxjs-compat layer (#3886)

* remove rxjs-compat layer

* add rxjs linter

* observable new instead of create

* lint fixes

* disable rxjs-no-subject-value for certain scenarios

* fix auth rxjs
This commit is contained in:
Denys Vuika
2018-10-16 19:45:00 +01:00
committed by Eugenio Romano
parent ccc52d40dd
commit f5a7b07370
29 changed files with 3337 additions and 3177 deletions

View File

@@ -27,7 +27,7 @@ import { map, catchError, tap } from 'rxjs/operators';
import { HttpHeaders } from '@angular/common/http';
const REMEMBER_ME_COOKIE_KEY = 'ALFRESCO_REMEMBER_ME';
const REMEMBER_ME_UNTIL = 1000 * 60 * 60 * 24 * 30 ;
const REMEMBER_ME_UNTIL = 1000 * 60 * 60 * 24 * 30;
@Injectable()
export class AuthenticationService {
@@ -50,10 +50,10 @@ export class AuthenticationService {
* @returns True if logged in, false otherwise
*/
isLoggedIn(): boolean {
if (!this.isOauth() && this.cookie.isEnabled() && !this.isRememberMeSet()) {
return false;
}
return this.alfrescoApi.getInstance().isLoggedIn();
if (!this.isOauth() && this.cookie.isEnabled() && !this.isRememberMeSet()) {
return false;
}
return this.alfrescoApi.getInstance().isLoggedIn();
}
/**
@@ -284,7 +284,7 @@ export class AuthenticationService {
}
addTokenToHeader(headersArg?: HttpHeaders): Observable<HttpHeaders> {
return Observable.create(async (observer: Observer<any>) => {
return new Observable((observer: Observer<any>) => {
let headers = headersArg;
if (!headers) {
headers = new HttpHeaders();