1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Add public settings endpoint

This commit is contained in:
Chocobozzz 2019-07-26 09:35:43 +02:00
parent 23bdacf8ec
commit ba211e7386
No known key found for this signature in database
GPG key ID: 583A612D890159BE
10 changed files with 94 additions and 28 deletions

View file

@ -119,6 +119,21 @@ function getPluginRegisteredSettings (parameters: {
})
}
function getPublicSettings (parameters: {
url: string,
npmName: string,
expectedStatus?: number
}) {
const { url, npmName, expectedStatus = 200 } = parameters
const path = '/api/v1/plugins/' + npmName + '/public-settings'
return makeGetRequest({
url,
path,
statusCodeExpected: expectedStatus
})
}
function installPlugin (parameters: {
url: string,
accessToken: string,
@ -218,5 +233,6 @@ export {
getPackageJSONPath,
updatePluginPackageJSON,
getPluginPackageJSON,
getPluginTestPath
getPluginTestPath,
getPublicSettings
}