]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add server config helper in plugin guide
authorChocobozzz <me@florianbigard.com>
Wed, 24 Mar 2021 10:48:02 +0000 (11:48 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 24 Mar 2021 17:18:41 +0000 (18:18 +0100)
support/doc/plugins/guide.md

index bc10e624de17e154632833e9fdd0159be2f36e6f..20cbec5c739bff8a88e97a106831386567631c7a 100644 (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):