diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-26 09:35:43 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-07-26 15:18:29 +0200 |
commit | ba211e7386bb2f25e37a4c5bcdfeb4237e1cd315 (patch) | |
tree | 398bb14a92c7df3765a0a64bac9f4672c5588488 /client/src/app/+admin | |
parent | 23bdacf8ec24ce47a15529830e116911d7478598 (diff) | |
download | PeerTube-ba211e7386bb2f25e37a4c5bcdfeb4237e1cd315.tar.gz PeerTube-ba211e7386bb2f25e37a4c5bcdfeb4237e1cd315.tar.zst PeerTube-ba211e7386bb2f25e37a4c5bcdfeb4237e1cd315.zip |
Add public settings endpoint
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r-- | client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts | 2 | ||||
-rw-r--r-- | client/src/app/+admin/plugins/shared/plugin-api.service.ts | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts index 569d98482..13d12b145 100644 --- a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts +++ b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts | |||
@@ -66,7 +66,7 @@ export class PluginShowInstalledComponent extends FormReactive implements OnInit | |||
66 | this.pluginService.getPlugin(npmName) | 66 | this.pluginService.getPlugin(npmName) |
67 | .pipe(switchMap(plugin => { | 67 | .pipe(switchMap(plugin => { |
68 | return this.pluginService.getPluginRegisteredSettings(plugin.name, plugin.type) | 68 | return this.pluginService.getPluginRegisteredSettings(plugin.name, plugin.type) |
69 | .pipe(map(data => ({ plugin, registeredSettings: data.settings }))) | 69 | .pipe(map(data => ({ plugin, registeredSettings: data.registeredSettings }))) |
70 | })) | 70 | })) |
71 | .subscribe( | 71 | .subscribe( |
72 | ({ plugin, registeredSettings }) => { | 72 | ({ plugin, registeredSettings }) => { |
diff --git a/client/src/app/+admin/plugins/shared/plugin-api.service.ts b/client/src/app/+admin/plugins/shared/plugin-api.service.ts index 343eb57b2..c360fc1b3 100644 --- a/client/src/app/+admin/plugins/shared/plugin-api.service.ts +++ b/client/src/app/+admin/plugins/shared/plugin-api.service.ts | |||
@@ -11,7 +11,7 @@ import { PeerTubePlugin } from '@shared/models/plugins/peertube-plugin.model' | |||
11 | import { ManagePlugin } from '@shared/models/plugins/manage-plugin.model' | 11 | import { ManagePlugin } from '@shared/models/plugins/manage-plugin.model' |
12 | import { InstallOrUpdatePlugin } from '@shared/models/plugins/install-plugin.model' | 12 | import { InstallOrUpdatePlugin } from '@shared/models/plugins/install-plugin.model' |
13 | import { PeerTubePluginIndex } from '@shared/models/plugins/peertube-plugin-index.model' | 13 | import { PeerTubePluginIndex } from '@shared/models/plugins/peertube-plugin-index.model' |
14 | import { RegisterServerSettingOptions } from '@shared/models/plugins/register-server-setting.model' | 14 | import { RegisteredServerSettings, RegisterServerSettingOptions } from '@shared/models/plugins/register-server-setting.model' |
15 | import { PluginService } from '@app/core/plugins/plugin.service' | 15 | import { PluginService } from '@app/core/plugins/plugin.service' |
16 | 16 | ||
17 | @Injectable() | 17 | @Injectable() |
@@ -91,7 +91,7 @@ export class PluginApiService { | |||
91 | const npmName = this.pluginService.nameToNpmName(pluginName, pluginType) | 91 | const npmName = this.pluginService.nameToNpmName(pluginName, pluginType) |
92 | const path = PluginApiService.BASE_PLUGIN_URL + '/' + npmName + '/registered-settings' | 92 | const path = PluginApiService.BASE_PLUGIN_URL + '/' + npmName + '/registered-settings' |
93 | 93 | ||
94 | return this.authHttp.get<{ settings: RegisterServerSettingOptions[] }>(path) | 94 | return this.authHttp.get<RegisteredServerSettings>(path) |
95 | .pipe(catchError(res => this.restExtractor.handleError(res))) | 95 | .pipe(catchError(res => this.restExtractor.handleError(res))) |
96 | } | 96 | } |
97 | 97 | ||