user.route.js 1.1 KB
Newer Older
한규민's avatar
한규민 committed
1
import express from "express";
Kim, Subin's avatar
Kim, Subin committed
2
import multer from "multer";
한규민's avatar
한규민 committed
3
4
5
import userCtrl from "../controllers/user.controller.js";

const router = express.Router();
한규민's avatar
한규민 committed
6
7
8
const upload = multer({
    dest: "upload/"
})
한규민's avatar
한규민 committed
9

한규민's avatar
한규민 committed
10
11
12
13
router
    .route("/user")
    .get(userCtrl.getUser)

한규민's avatar
한규민 committed
14
router
한규민's avatar
한규민 committed
15
16
17
    .route("/login")
    .post(userCtrl.login)

한규민's avatar
context    
한규민 committed
18
19
20
21
router
    .route("/logout")
    .get(userCtrl.logout)

한규민's avatar
한규민 committed
22
23
24
25
router
    .route("/guest")
    .post(userCtrl.guestLogin)

한규민's avatar
한규민 committed
26
27
28
29
router
    .route("/signup")
    .post(userCtrl.signup)

한규민's avatar
한규민 committed
30
router
Kim, Subin's avatar
Kim, Subin committed
31
32
33
34
35
    .route("/profile")
    .post(
        upload.single("image"),
        userCtrl.uploadProfile
    )
36

한규민's avatar
한규민 committed
37
38
39
40
41
router
    .route("/modify")
    .post(userCtrl.modifyUser)

router
한규민's avatar
한규민 committed
42
43
    .route("/member")
    .get(userCtrl.getMember)
Kim, Subin's avatar
Kim, Subin committed
44

45
router
Kim, Subin's avatar
Kim, Subin committed
46
47
    .route("/num")
    .post(userCtrl.confirmNum)
한규민's avatar
한규민 committed
48

한규민's avatar
한규민 committed
49
50
51
52
router
    .route("/pw/:pw")
    .get(userCtrl.comparePw)

한규민's avatar
한규민 committed
53
router
한규민's avatar
한규민 committed
54
55
    .route("/phone/:phone")
    .post(userCtrl.confirmMbnum)
한규민's avatar
한규민 committed
56

Kim, Subin's avatar
Kim, Subin committed
57
58
router
    .route('/getuserinfo')
59
    .post(userCtrl.getUserInfo)
한규민's avatar
한규민 committed
60

Kim, Subin's avatar
Kim, Subin committed
61
62
router
    .route('/guest/save')
Jiwon Yoon's avatar
Jiwon Yoon committed
63
64
    .post(userCtrl.saveGuestInfo)

Kim, Subin's avatar
Kim, Subin committed
65
66
router
    .route('/guestinfo/:guestId')
67
68
    .get(userCtrl.getGuestInfo)

한규민's avatar
한규민 committed
69
export default router;