aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/plugins/plugin.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/core/plugins/plugin.service.ts')
-rw-r--r--client/src/app/core/plugins/plugin.service.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts
index 45d8088a4..714abd82d 100644
--- a/client/src/app/core/plugins/plugin.service.ts
+++ b/client/src/app/core/plugins/plugin.service.ts
@@ -15,6 +15,7 @@ import { PeerTubePlugin } from '@shared/models/plugins/peertube-plugin.model'
15import { HttpClient } from '@angular/common/http' 15import { HttpClient } from '@angular/common/http'
16import { RestExtractor } from '@app/shared/rest' 16import { RestExtractor } from '@app/shared/rest'
17import { PluginType } from '@shared/models/plugins/plugin.type' 17import { PluginType } from '@shared/models/plugins/plugin.type'
18import { PublicServerSetting } from '@shared/models/plugins/public-server.setting'
18 19
19interface HookStructValue extends RegisterClientHookOptions { 20interface HookStructValue extends RegisterClientHookOptions {
20 plugin: ServerConfigPlugin 21 plugin: ServerConfigPlugin
@@ -241,11 +242,11 @@ export class PluginService implements ClientHook {
241 242
242 getSettings: () => { 243 getSettings: () => {
243 const npmName = this.nameToNpmName(pluginInfo.plugin.name, pluginInfo.pluginType) 244 const npmName = this.nameToNpmName(pluginInfo.plugin.name, pluginInfo.pluginType)
244 const path = PluginService.BASE_PLUGIN_URL + '/' + npmName 245 const path = PluginService.BASE_PLUGIN_URL + '/' + npmName + '/public-settings'
245 246
246 return this.authHttp.get<PeerTubePlugin>(path) 247 return this.authHttp.get<PublicServerSetting>(path)
247 .pipe( 248 .pipe(
248 map(p => p.settings), 249 map(p => p.publicSettings),
249 catchError(res => this.restExtractor.handleError(res)) 250 catchError(res => this.restExtractor.handleError(res))
250 ) 251 )
251 .toPromise() 252 .toPromise()