ニジカ投稿局 https://tv.nizika.tv
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.js 602 B

123456789101112131415161718192021222324252627
  1. async function register ({
  2. getRouter
  3. }) {
  4. const router = getRouter()
  5. router.get('/ping', (req, res) => res.json({ message: 'pong' }))
  6. router.get('/is-authenticated', (req, res) => res.json({ isAuthenticated: res.locals.authenticated }))
  7. router.post('/form/post/mirror', (req, res) => {
  8. res.json(req.body)
  9. })
  10. router.post('/form/post/mirror-raw-body', (req, res) => {
  11. res.json(JSON.parse(req.rawBody))
  12. })
  13. }
  14. async function unregister () {
  15. return
  16. }
  17. module.exports = {
  18. register,
  19. unregister
  20. }
  21. // ###########################################################################