2020-04-10 15:07:54 +02:00
|
|
|
async function register ({
|
|
|
|
getRouter
|
|
|
|
}) {
|
|
|
|
const router = getRouter()
|
|
|
|
router.get('/ping', (req, res) => res.json({ message: 'pong' }))
|
|
|
|
|
2020-12-04 20:56:48 +01:00
|
|
|
router.get('/is-authenticated', (req, res) => res.json({ isAuthenticated: res.locals.authenticated }))
|
|
|
|
|
2020-04-10 15:07:54 +02:00
|
|
|
router.post('/form/post/mirror', (req, res) => {
|
|
|
|
res.json(req.body)
|
|
|
|
})
|
2024-03-29 08:22:26 +01:00
|
|
|
|
|
|
|
router.post('/form/post/mirror-raw-body', (req, res) => {
|
|
|
|
res.json(JSON.parse(req.rawBody))
|
|
|
|
})
|
2020-04-10 15:07:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
async function unregister () {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
register,
|
|
|
|
unregister
|
|
|
|
}
|
|
|
|
|
|
|
|
// ###########################################################################
|