plan.route.js 338 Bytes
Newer Older
Choi Ga Young's avatar
Choi Ga Young committed
1
2
3
4
5
6
import express from 'express';
import planCtrl from '../controllers/plan.controller.js'

const router = express.Router();

router
Kim, Subin's avatar
plan    
Kim, Subin committed
7
8
  .route("/")
  .post(planCtrl.create)
Choi Ga Young's avatar
Choi Ga Young committed
9
10

router
Kim, Subin's avatar
plan    
Kim, Subin committed
11
12
13
14
15
16
  .route("/:planId")
  .get(planCtrl.getOne)
  .put(planCtrl.edit)
  .delete(planCtrl.remove)

router.param("planId", planCtrl.getParams)
Choi Ga Young's avatar
Choi Ga Young committed
17
18

export default router;