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:
parent
23bdacf8ec
commit
ba211e7386
10 changed files with 94 additions and 28 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue