[pluginsFunctionality | DONE | CHANGED] remove cache from plugins, configuration and helper services

This commit is contained in:
argirok 2024-05-09 10:18:20 +03:00
parent 6c1c3ef2b2
commit 01554f58f5
3 changed files with 5 additions and 5 deletions

View File

@ -52,11 +52,11 @@ export class PluginsService {
}
getPluginsByPageRoute(api:string, pid:string, route:string){
let url = api + 'community/' +pid+'/plugins/page/route?route=' + route;
return this.http.get<Array<Plugin>>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) : url);
return this.http.get<Array<Plugin>>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) : */url);
}
getPluginTemplatesByPageRoute(api:string, pid:string, route:string){
let url = api + 'community/' + pid + '/pluginTemplates/page/route?route=' + route;
return this.http.get<Array<PluginTemplate>>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) : url);
return this.http.get<Array<PluginTemplate>>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) :*/ url);
}
togglePlugin(id: string, status: boolean, api: string, community) {

View File

@ -37,7 +37,7 @@ export class ConfigurationService {
if (pid == null || this.portal?.getValue()?.static) return;
let url = properties.adminToolsAPIURL + "/" + properties.adminToolsPortalType + "/" + pid + "/full";
this.promise = new Promise<void>(resolve => {
this.sub = this.http.get<Portal>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) : url).subscribe(
this.sub = this.http.get<Portal>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) :*/ url).subscribe(
(portal: Portal) => {
this.portal.next(portal);
resolve();

View File

@ -26,7 +26,7 @@ export class HelperService {
}
}
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)+ (properties.forceCacheReload?'&forceReload=true':'')): url);
return this.http.get(/*(properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)+ (properties.forceCacheReload?'&forceReload=true':'')):*/ url);
//.map(res => <any> res.json());
}
@ -43,7 +43,7 @@ export class HelperService {
let url = properties.adminToolsAPIURL;
url += '/' + portalType + '/' + portal + '/pagehelpcontent/grouped?active=true&page=' +
((page_route.indexOf("/"+portal+"/")!=-1 ) ? ("/" + page_route.split("/"+portal+"/")[1]) : page_route);
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)+ (properties.forceCacheReload?'&forceReload=true':'')) : url);
return this.http.get(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)+ (properties.forceCacheReload?'&forceReload=true':'')) :*/ url);
}else {
return of(null);
}