From f17faefb30e4872688a1c0dafcc6c793242750f4 Mon Sep 17 00:00:00 2001 From: kontrollanten <6680299+kontrollanten@users.noreply.github.com> Date: Fri, 4 Dec 2020 20:56:48 +0100 Subject: plugins: add optional authentication for routes --- server/tests/fixtures/peertube-plugin-test-five/main.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'server/tests/fixtures') 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 ({ const router = getRouter() router.get('/ping', (req, res) => res.json({ message: 'pong' })) + router.get('/is-authenticated', (req, res) => res.json({ isAuthenticated: res.locals.authenticated })) + router.post('/form/post/mirror', (req, res) => { res.json(req.body) }) -- cgit v1.2.3