plan.route.js 396 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

Choi Ga Young's avatar
Choi Ga Young committed
10
11
12
13
router
  .route("/check/:planId")
  .put(planCtrl.putCk)

Choi Ga Young's avatar
Choi Ga Young committed
14
router
Kim, Subin's avatar
plan    
Kim, Subin committed
15
16
17
18
19
20
  .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
21
22

export default router;