Add server config helper in plugin guide

pull/3888/head
Chocobozzz 2021-03-24 11:48:02 +01:00
parent 7bd455cb7f
commit ec99e8486a
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 10 additions and 0 deletions

View File

@ -22,6 +22,7 @@
- [Custom Modal](#custom-modal)
- [Translate](#translate)
- [Get public settings](#get-public-settings)
- [Get server config](#get-server-config)
- [Add custom fields to video form](#add-custom-fields-to-video-form)
- [Publishing](#publishing)
- [Write a plugin/theme](#write-a-plugintheme)
@ -470,6 +471,15 @@ peertubeHelpers.getSettings()
})
```
#### Get server config
```js
peertubeHelpers.getServerConfig()
.then(config => {
console.log('Fetched server config.', config)
})
```
#### Add custom fields to video form
To add custom fields in the video form (in *Plugin settings* tab):