aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test-five/main.js
blob: 07dd18654440f5933a47fcaab00f52cffea4d22a (plain) (tree)
1
2
3
4
5
6
7
8





                                                                  

                                                                                                        














                                                                              
async function register ({
  getRouter
}) {
  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)
  })
}

async function unregister () {
  return
}

module.exports = {
  register,
  unregister
}

// ###########################################################################