diff options
Diffstat (limited to 'shared/extra-utils/server')
-rw-r--r-- | shared/extra-utils/server/plugins.ts | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/shared/extra-utils/server/plugins.ts b/shared/extra-utils/server/plugins.ts index 2302208a8..65d37d69f 100644 --- a/shared/extra-utils/server/plugins.ts +++ b/shared/extra-utils/server/plugins.ts | |||
@@ -119,6 +119,21 @@ function getPluginRegisteredSettings (parameters: { | |||
119 | }) | 119 | }) |
120 | } | 120 | } |
121 | 121 | ||
122 | function getPublicSettings (parameters: { | ||
123 | url: string, | ||
124 | npmName: string, | ||
125 | expectedStatus?: number | ||
126 | }) { | ||
127 | const { url, npmName, expectedStatus = 200 } = parameters | ||
128 | const path = '/api/v1/plugins/' + npmName + '/public-settings' | ||
129 | |||
130 | return makeGetRequest({ | ||
131 | url, | ||
132 | path, | ||
133 | statusCodeExpected: expectedStatus | ||
134 | }) | ||
135 | } | ||
136 | |||
122 | function installPlugin (parameters: { | 137 | function installPlugin (parameters: { |
123 | url: string, | 138 | url: string, |
124 | accessToken: string, | 139 | accessToken: string, |
@@ -218,5 +233,6 @@ export { | |||
218 | getPackageJSONPath, | 233 | getPackageJSONPath, |
219 | updatePluginPackageJSON, | 234 | updatePluginPackageJSON, |
220 | getPluginPackageJSON, | 235 | getPluginPackageJSON, |
221 | getPluginTestPath | 236 | getPluginTestPath, |
237 | getPublicSettings | ||
222 | } | 238 | } |