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

const router = express.Router();

router
    .route("/")
Jiwon Yoon's avatar
Jiwon Yoon committed
8
9
10
11
12
13
14
// .post(movieCtrl.comparePopularMovie)

router.route('/showmovie/:category')
    .get(movieCtrl.getMovieById)

router.route('/movielist')
    .get(movieCtrl.getMovieList)
Jiwon Yoon's avatar
Jiwon Yoon committed
15

16
17
18
router
    .route("/:movieId")
    .post(movieCtrl.create)
Jiwon Yoon's avatar
Jiwon Yoon committed
19

Jiwon Yoon's avatar
Jiwon Yoon committed
20
21
router.param('category', movieCtrl.getMovieByCategory)

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