diff options
Diffstat (limited to 'shared/extra-utils/server/plugins.ts')
-rw-r--r-- | shared/extra-utils/server/plugins.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/shared/extra-utils/server/plugins.ts b/shared/extra-utils/server/plugins.ts index 65d37d69f..5c0d1e511 100644 --- a/shared/extra-utils/server/plugins.ts +++ b/shared/extra-utils/server/plugins.ts | |||
@@ -134,6 +134,21 @@ function getPublicSettings (parameters: { | |||
134 | }) | 134 | }) |
135 | } | 135 | } |
136 | 136 | ||
137 | function getPluginTranslations (parameters: { | ||
138 | url: string, | ||
139 | locale: string, | ||
140 | expectedStatus?: number | ||
141 | }) { | ||
142 | const { url, locale, expectedStatus = 200 } = parameters | ||
143 | const path = '/plugins/translations/' + locale + '.json' | ||
144 | |||
145 | return makeGetRequest({ | ||
146 | url, | ||
147 | path, | ||
148 | statusCodeExpected: expectedStatus | ||
149 | }) | ||
150 | } | ||
151 | |||
137 | function installPlugin (parameters: { | 152 | function installPlugin (parameters: { |
138 | url: string, | 153 | url: string, |
139 | accessToken: string, | 154 | accessToken: string, |
@@ -224,6 +239,7 @@ export { | |||
224 | listPlugins, | 239 | listPlugins, |
225 | listAvailablePlugins, | 240 | listAvailablePlugins, |
226 | installPlugin, | 241 | installPlugin, |
242 | getPluginTranslations, | ||
227 | getPluginsCSS, | 243 | getPluginsCSS, |
228 | updatePlugin, | 244 | updatePlugin, |
229 | getPlugin, | 245 | getPlugin, |