plugins-functionality #43

Merged
argiro.kokogiannaki merged 86 commits from plugins-functionality into develop 2024-06-13 09:14:22 +02:00
1 changed files with 8 additions and 4 deletions
Showing only changes of commit 25051df626 - Show all commits

View File

@ -23,12 +23,12 @@ export class PluginsService {
return this.http.post<PluginTemplate>(api + 'pluginTemplate/save/order/' + position, pluginTemplate, CustomOptions.getAuthOptionsWithBody()); return this.http.post<PluginTemplate>(api + 'pluginTemplate/save/order/' + position, pluginTemplate, CustomOptions.getAuthOptionsWithBody());
} }
updatePluginOrder(plugin: Plugin, api: string, position) { updatePluginOrder(plugin: Plugin, api: string, position, community) {
return this.http.post<Plugin>(api + 'plugin/save/order/' + position, plugin, CustomOptions.getAuthOptionsWithBody()); return this.http.post<Plugin>(api + 'community/'+community+'/plugin/save/order/' + position, plugin, CustomOptions.getAuthOptionsWithBody());
} }
savePlugin(plugin, api: string) { savePlugin(plugin, api: string, community) {
return this.http.post<Plugin>(api + 'plugin/save', JSON.stringify(plugin), CustomOptions.getAuthOptionsWithBody()); return this.http.post<Plugin>(api + 'community/' + community + '/plugin/save', JSON.stringify(plugin), CustomOptions.getAuthOptionsWithBody());
} }
deletePluginTemplate(id, api: string) { deletePluginTemplate(id, api: string) {
@ -58,4 +58,8 @@ export class PluginsService {
let url = api + 'community/' + pid + '/pluginTemplates/page/route?route=' + route; 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) {
return this.http.post(api + 'community/' + community + '/plugin/status/' + id, status, CustomOptions.getAuthOptionsWithBody());
}
} }