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.

14 lines
664 B

12 months ago
  1. const router = require('express').Router()
  2. // 컨트롤러 파일을 불러옵니다.
  3. const controller = loadModule('board', 'controller');
  4. router.get('/:boardKey', controller.getBoardInfo)
  5. router.get('/:boardKey/posts', controller.getPostList)
  6. router.get('/:boardKey/posts/:postId/comments', controller.getPostList)
  7. router.get('/:boardKey/posts/:postId', controller.getPost)
  8. router.post('/:boardKey/posts', controller.writeBoardPost)
  9. router.put('/:boardKey/posts/:postId', controller.writeBoardPost)
  10. router.post('/:boardKey/posts/:postId/hit', controller.increasePostHit)
  11. router.delete('/:boardKey/posts/:postId', controller.deletePost)
  12. module.exports = router