subject.route.js 413 Bytes
Newer Older
1
2
3
4
5
6
import express from 'express';
import subjectCtrl from '../controllers/subject.controller.js';

const router = express.Router();

router
Kim, Subin's avatar
Kim, Subin committed
7
8
  .route("/allaboutplan/:userId")
  .get(subjectCtrl.findAll)
9

10
router
Kim, Subin's avatar
Kim, Subin committed
11
12
13
14
15
  .route("/:userId")
  .get(subjectCtrl.findSubject)
  .post(subjectCtrl.create)
  .put(subjectCtrl.edit)
  .delete(subjectCtrl.remove)
Choi Ga Young's avatar
Choi Ga Young committed
16

Kim, Subin's avatar
Kim, Subin committed
17
router.param("userId", subjectCtrl.getParams)
18

19
export default router;