diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2020-12-04 20:56:48 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-12-08 10:40:08 +0100 |
commit | f17faefb30e4872688a1c0dafcc6c793242750f4 (patch) | |
tree | fcae9afbdbb1f3fffff89737c2e3d7c3919510cd /server/tests/fixtures/peertube-plugin-test-five/main.js | |
parent | c824e8a0c7f28a8770553e21e225589dd8f015c0 (diff) | |
download | PeerTube-f17faefb30e4872688a1c0dafcc6c793242750f4.tar.gz PeerTube-f17faefb30e4872688a1c0dafcc6c793242750f4.tar.zst PeerTube-f17faefb30e4872688a1c0dafcc6c793242750f4.zip |
plugins: add optional authentication for routes
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test-five/main.js')
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test-five/main.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test-five/main.js b/server/tests/fixtures/peertube-plugin-test-five/main.js index c1435b928..07dd18654 100644 --- a/server/tests/fixtures/peertube-plugin-test-five/main.js +++ b/server/tests/fixtures/peertube-plugin-test-five/main.js | |||
@@ -4,6 +4,8 @@ async function register ({ | |||
4 | const router = getRouter() | 4 | const router = getRouter() |
5 | router.get('/ping', (req, res) => res.json({ message: 'pong' })) | 5 | router.get('/ping', (req, res) => res.json({ message: 'pong' })) |
6 | 6 | ||
7 | router.get('/is-authenticated', (req, res) => res.json({ isAuthenticated: res.locals.authenticated })) | ||
8 | |||
7 | router.post('/form/post/mirror', (req, res) => { | 9 | router.post('/form/post/mirror', (req, res) => { |
8 | res.json(req.body) | 10 | res.json(req.body) |
9 | }) | 11 | }) |