movie.route.js 599 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)

Kim, Subin's avatar
Kim, Subin committed
11
12
13
14
15
16
17
18
router
    .route("/all")
    .get(movieCtrl.getAllMovie)

router
    .route("/search")
    .get(movieCtrl.findforKeyword)

19
20
21
router
    .route("/:movieId")
    .post(movieCtrl.create)
Kim, Subin's avatar
Kim, Subin committed
22
    .delete(movieCtrl.remove)
Jiwon Yoon's avatar
Jiwon Yoon committed
23

Kim, Subin's avatar
Kim, Subin committed
24
25
26
27
28
29
router
    .route('/showmovie/:category')
    .get(movieCtrl.getMovieById)

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

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