movie.route.js 445 Bytes
Newer Older
Jiwon Yoon's avatar
Jiwon Yoon committed
1
2
3
4
5
6
7
8
9
10
import express from "express";
import movieCtrl from "../controllers/movie.controller.js";

const router = express.Router();

router
    .route("/")
    .post(movieCtrl.comparePopularMovie)
    .get(movieCtrl.comparePopularMovie)

11
12
13
router
    .route("/:movieId")
    .post(movieCtrl.create)
Jiwon Yoon's avatar
Jiwon Yoon committed
14

Kim, Subin's avatar
Kim, Subin committed
15
16
17
18
19
20
router
    .route('/showmovie/:category')
    .get(movieCtrl.getMovieById)

router.param('category', movieCtrl.getMovieByCategory)

Jiwon Yoon's avatar
Jiwon Yoon committed
21
export default router;