user.route.js 1.11 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
6
import userCtrl from "../controllers/user.controller.js";

const router = express.Router();

Kim, Subin's avatar
Kim, Subin committed
7
8
9
10
11
12
13
14
const upload = multer({
    dest: "upload/"
})

router
    .route("/user")
    .get(userCtrl.getUser)

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

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

한규민's avatar
한규민 committed
23
24
25
26
router
    .route("/signup")
    .post(userCtrl.signup)

한규민's avatar
한규민 committed
27
router
Kim, Subin's avatar
Kim, Subin committed
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
    .route("/profile")
    .post(
        upload.single("image"),
        userCtrl.uploadProfile
    )

router
    .route("/modify")
    .post(userCtrl.modifyUser)

router
    .route("/member")
    .get(userCtrl.getMember)

router
    .route("/num")
    .post(userCtrl.confirmNum)
한규민's avatar
한규민 committed
45

한규민's avatar
한규민 committed
46
router
Kim, Subin's avatar
Kim, Subin committed
47
48
    .route("/pw/:pw")
    .get(userCtrl.comparePw)
한규민's avatar
한규민 committed
49
50

router
Kim, Subin's avatar
Kim, Subin committed
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
    .route("/phone/:phone")
    .post(userCtrl.confirmMbnum)

router
    .route('/getuserinfo')
    .post(userCtrl.getUserInfo)

router
    .route('/guest/save')
    .post(userCtrl.saveGuestInfo)

router
    .route('/guestinfo/:guestId')
    .get(userCtrl.getGuestInfo)

router
    .route("/:userId")
    .get(userCtrl.compareId)
한규민's avatar
한규민 committed
69

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