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

const router = express.Router();

router
  .route("/addsubject")
  .post(subjectCtrl.addsubject)

10
router
Choi Ga Young's avatar
Choi Ga Young committed
11
12
13
14
15
16
  .route("/all/:userId")
  .get(subjectCtrl.allSubject)

router
  .route("/title/:userId")
  .get(subjectCtrl.subjectTitle)
17
18

router
Choi Ga Young's avatar
Choi Ga Young committed
19
20
21
  .route("/:subjectId")
  .put(subjectCtrl.editSubject)
  .get(subjectCtrl.getSubInfo)
22

23
export default router;