diff options
author | Chocobozzz <me@florianbigard.com> | 2021-04-22 15:16:35 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-04-22 15:16:35 +0200 |
commit | 6290699080cbcc5e454982c55a451ee23223ee2c (patch) | |
tree | 0989b7a146403e347b541b59b3bb4d056f8258ca /server/tests/fixtures/peertube-plugin-test-four | |
parent | 0f319334065fae8756fe7c7eec333000474d07ba (diff) | |
download | PeerTube-6290699080cbcc5e454982c55a451ee23223ee2c.tar.gz PeerTube-6290699080cbcc5e454982c55a451ee23223ee2c.tar.zst PeerTube-6290699080cbcc5e454982c55a451ee23223ee2c.zip |
Fix plugin helpers tests
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test-four')
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test-four/main.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test-four/main.js b/server/tests/fixtures/peertube-plugin-test-four/main.js index 6930ac511..6ed0c20d2 100644 --- a/server/tests/fixtures/peertube-plugin-test-four/main.js +++ b/server/tests/fixtures/peertube-plugin-test-four/main.js | |||
@@ -88,8 +88,9 @@ async function register ({ | |||
88 | return res.json({ routerRoute }) | 88 | return res.json({ routerRoute }) |
89 | }) | 89 | }) |
90 | 90 | ||
91 | router.get('/user', async (req, res) => { | 91 | router.get('/user', (req, res) => { |
92 | const user = peertubeHelpers.user.getAuthUser(res) | 92 | const user = peertubeHelpers.user.getAuthUser(res) |
93 | if (!user) return res.sendStatus(404) | ||
93 | 94 | ||
94 | const isAdmin = user.role === 0 | 95 | const isAdmin = user.role === 0 |
95 | const isModerator = user.role === 1 | 96 | const isModerator = user.role === 1 |