Remove oauth
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { OAuthService } from 'angular-oauth2-oidc';
|
||||
import { Observable, ReplaySubject, Subscription, timer } from 'rxjs';
|
||||
import { catchError, take } from 'rxjs/operators';
|
||||
import { IItem } from '../models/item';
|
||||
@@ -12,7 +11,7 @@ export class CacheService {
|
||||
private proxyCacheMap: { [key: string]: ReplaySubject<IItem[]> } = {};
|
||||
private subscriptionMap: { [key: string]: Subscription } = {};
|
||||
|
||||
constructor(private itemService: ItemService, public oauthService: OAuthService) {
|
||||
constructor(private itemService: ItemService) {
|
||||
timer(0, REFRESH_INTERVAL).subscribe(() => {
|
||||
this.subscriptionMap = {};
|
||||
})
|
||||
@@ -23,7 +22,7 @@ export class CacheService {
|
||||
this.proxyCacheMap[itemType] = new ReplaySubject(1);
|
||||
}
|
||||
|
||||
if (this.oauthService.getAccessToken() != null && !this.subscriptionMap[itemType]) {
|
||||
if (!this.subscriptionMap[itemType]) {
|
||||
this.subscriptionMap[itemType] = this.itemService.getItemList(itemType)
|
||||
.pipe(
|
||||
catchError(error => {
|
||||
|
||||
Reference in New Issue
Block a user