movie.route.js 697 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("/")
8
    .get(movieCtrl.getListfromDB)
Jiwon Yoon's avatar
Jiwon Yoon committed
9
10


11
router
12
    .route('/movielist/:category')
Jiwon Yoon's avatar
Jiwon Yoon committed
13
    .get(movieCtrl.getMovieList)
Jiwon Yoon's avatar
Jiwon Yoon committed
14

Kim, Subin's avatar
Kim, Subin committed
15
16
router
    .route("/all")
Kim, Subin's avatar
Kim, Subin committed
17
18
    .get(
        movieCtrl.getAllMovie,
Kim, Subin's avatar
search    
Kim, Subin committed
19
20
        movieCtrl.movieforAdmin
    )
Kim, Subin's avatar
Kim, Subin committed
21
router
Kim, Subin's avatar
search    
Kim, Subin committed
22
23
24
25
26
    .route("/search/home")
    .get(movieCtrl.findonlyTitle)

router
    .route("/search/admin")
Kim, Subin's avatar
Kim, Subin committed
27
28
    .get(
        movieCtrl.findaboutAll,
Kim, Subin's avatar
search    
Kim, Subin committed
29
30
        movieCtrl.movieforAdmin
    )
Kim, Subin's avatar
Kim, Subin committed
31

32
33
34
router
    .route("/:movieId")
    .post(movieCtrl.create)
Kim, Subin's avatar
Kim, Subin committed
35
    .delete(movieCtrl.remove)
한규민's avatar
한규민 committed
36
    .get(movieCtrl.getMovieById)
Jiwon Yoon's avatar
Jiwon Yoon committed
37

Kim, Subin's avatar
Kim, Subin committed
38

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