aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/plugins
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-27 16:12:41 +0200
committerChocobozzz <me@florianbigard.com>2021-05-27 16:12:41 +0200
commit8f608a4cb22ab232cfab20665050764b38bac9c7 (patch)
tree6a6785aae79bf5939ad7b7a50a1bd8031268d2b4 /support/doc/plugins
parent030ccfce59a8cb8f2fee6ea8dd363ba635c5c5c2 (diff)
parentc215e627b575d2c4085ccb222f4ca8d0237b7552 (diff)
downloadPeerTube-8f608a4cb22ab232cfab20665050764b38bac9c7.tar.gz
PeerTube-8f608a4cb22ab232cfab20665050764b38bac9c7.tar.zst
PeerTube-8f608a4cb22ab232cfab20665050764b38bac9c7.zip
Merge branch 'develop' into shorter-URLs-channels-accounts
Diffstat (limited to 'support/doc/plugins')
-rw-r--r--support/doc/plugins/guide.md13
1 files changed, 11 insertions, 2 deletions
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md
index 53d53c26d..d3b9db0ed 100644
--- a/support/doc/plugins/guide.md
+++ b/support/doc/plugins/guide.md
@@ -39,6 +39,7 @@
39 - [Build your plugin](#build-your-plugin) 39 - [Build your plugin](#build-your-plugin)
40 - [Test your plugin/theme](#test-your-plugintheme) 40 - [Test your plugin/theme](#test-your-plugintheme)
41 - [Publish](#publish) 41 - [Publish](#publish)
42 - [Unpublish](#unpublish)
42- [Plugin & Theme hooks/helpers API](#plugin--theme-hookshelpers-api) 43- [Plugin & Theme hooks/helpers API](#plugin--theme-hookshelpers-api)
43- [Tips](#tips) 44- [Tips](#tips)
44 - [Compatibility with PeerTube](#compatibility-with-peertube) 45 - [Compatibility with PeerTube](#compatibility-with-peertube)
@@ -261,8 +262,8 @@ function register ({
261 router.get('/ping', (req, res) => res.json({ message: 'pong' })) 262 router.get('/ping', (req, res) => res.json({ message: 'pong' }))
262 263
263 // Users are automatically authenticated 264 // Users are automatically authenticated
264 router.get('/auth', (res, res) => { 265 router.get('/auth', async (res, res) => {
265 const user = peertubeHelpers.user.getAuthUser(res) 266 const user = await peertubeHelpers.user.getAuthUser(res)
266 267
267 const isAdmin = user.role === 0 268 const isAdmin = user.role === 0
268 const isModerator = user.role === 1 269 const isModerator = user.role === 1
@@ -909,6 +910,14 @@ $ npm publish
909Every time you want to publish another version of your plugin/theme, just update the `version` key from the `package.json` 910Every time you want to publish another version of your plugin/theme, just update the `version` key from the `package.json`
910and republish it on NPM. Remember that the PeerTube index will take into account your new plugin/theme version after ~24 hours. 911and republish it on NPM. Remember that the PeerTube index will take into account your new plugin/theme version after ~24 hours.
911 912
913### Unpublish
914
915If for a particular reason you don't want to maintain your plugin/theme anymore
916you can deprecate it. The plugin index will automatically remove it preventing users to find/install it from the PeerTube admin interface:
917
918```bash
919$ npm deprecate peertube-plugin-xxx@"> 0.0.0" "explain here why you deprecate your plugin/theme"
920```
912 921
913## Plugin & Theme hooks/helpers API 922## Plugin & Theme hooks/helpers API
914 923