From ec99e8486af6aab5a8affa2e7b9088635647b2ce Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 Mar 2021 11:48:02 +0100 Subject: [PATCH] Add server config helper in plugin guide --- support/doc/plugins/guide.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md index bc10e624d..20cbec5c7 100644 --- a/support/doc/plugins/guide.md +++ b/support/doc/plugins/guide.md @@ -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):