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.
 
 
 

15 lines
664 B

const router = require('express').Router()
// 컨트롤러 파일을 불러옵니다.
const controller = loadModule('board', 'controller');
router.get('/:boardKey', controller.getBoardInfo)
router.get('/:boardKey/posts', controller.getPostList)
router.get('/:boardKey/posts/:postId/comments', controller.getPostList)
router.get('/:boardKey/posts/:postId', controller.getPost)
router.post('/:boardKey/posts', controller.writeBoardPost)
router.put('/:boardKey/posts/:postId', controller.writeBoardPost)
router.post('/:boardKey/posts/:postId/hit', controller.increasePostHit)
router.delete('/:boardKey/posts/:postId', controller.deletePost)
module.exports = router