aboutsummaryrefslogtreecommitdiffhomepage
path: root/support
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-05 15:26:28 +0200
committerChocobozzz <me@florianbigard.com>2021-05-05 15:26:28 +0200
commitb31d72625dd32143a45277528b90bb67a881f249 (patch)
tree7721accc994121de668933672a3d51b892e3cb77 /support
parent7a22a0a56aa75fbb1ba986a5d2c606e1343f30c2 (diff)
downloadPeerTube-b31d72625dd32143a45277528b90bb67a881f249.tar.gz
PeerTube-b31d72625dd32143a45277528b90bb67a881f249.tar.zst
PeerTube-b31d72625dd32143a45277528b90bb67a881f249.zip
Plugin user.getAuthUser is now async
So we can load the full user
Diffstat (limited to 'support')
-rw-r--r--support/doc/plugins/guide.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md
index 53d53c26d..5b7d1cb31 100644
--- a/support/doc/plugins/guide.md
+++ b/support/doc/plugins/guide.md
@@ -261,8 +261,8 @@ function register ({
261 router.get('/ping', (req, res) => res.json({ message: 'pong' })) 261 router.get('/ping', (req, res) => res.json({ message: 'pong' }))
262 262
263 // Users are automatically authenticated 263 // Users are automatically authenticated
264 router.get('/auth', (res, res) => { 264 router.get('/auth', async (res, res) => {
265 const user = peertubeHelpers.user.getAuthUser(res) 265 const user = await peertubeHelpers.user.getAuthUser(res)
266 266
267 const isAdmin = user.role === 0 267 const isAdmin = user.role === 0
268 const isModerator = user.role === 1 268 const isModerator = user.role === 1