[Trunk | Library]:

1. curator.service.ts: Use "useLongCache" property for curators.
2. helper.service.ts: Use "useLongCache" property for helptexts.
3. env-properties.ts: Add "useLongCache" property.


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59073 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2020-07-12 22:14:50 +00:00
parent 9f569ac4c4
commit 0e26d955bc
3 changed files with 6 additions and 5 deletions

View File

@ -13,7 +13,7 @@ export class CuratorService {
public getCurators(properties: EnvProperties, emails: string): Observable<Curator[]> {
let url: string = properties.adminToolsAPIURL + '/curator?emails='+emails;
return this.http.get<Curator[]>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
return this.http.get<Curator[]>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
}
public updateCurator(properties: EnvProperties, curator: Curator) {
@ -23,7 +23,7 @@ export class CuratorService {
public getCurator(properties: EnvProperties, curatorId: string): Observable<Curator> {
let url: string = properties.adminToolsAPIURL + 'curator/'+curatorId;
return this.http.get<Curator>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
return this.http.get<Curator>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
}
}

View File

@ -24,7 +24,7 @@ export class HelperService {
}
}
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
//.map(res => <any> res.json());
}
@ -36,7 +36,7 @@ export class HelperService {
let page_route: string = router.split('?')[0].substring(0);
let url = properties.adminToolsAPIURL;
url += '/community/' + communityId + '/pagehelpcontent?active=true&page='+page_route;
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
}
getDivHelpContents(properties:EnvProperties, communityId:string, router: string):any {
@ -46,7 +46,7 @@ export class HelperService {
let page_route: string = router.split('?')[0].substring(0);
let url = properties.adminToolsAPIURL;
url += '/community/' + communityId + '/divhelpcontent?active=true&page='+page_route;
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
}
}

View File

@ -8,6 +8,7 @@ export interface EnvProperties {
domain?: string;
enablePiwikTrack?: boolean;
useCache?: boolean;
useLongCache?: boolean;
showAddThis?: boolean;
showContent?: boolean;
metricsAPIURL?: string;