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
// .post(movieCtrl.comparePopularMovie)

Jiwon Yoon's avatar
Jiwon Yoon committed
10
router.route('/showmovies/:category')
Jiwon Yoon's avatar
Jiwon Yoon committed
11
12
13
14
    .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
router.param('category', movieCtrl.getMovieByCategory)
Jiwon Yoon's avatar
Jiwon Yoon committed
21
export default router;