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

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("/signup")
    .post(userCtrl.signup)

한규민's avatar
한규민 committed
26
27
router
    .post("/profile", upload.single("image"), userCtrl.uploadProfile)
28

한규민's avatar
한규민 committed
29
30
31
32
33
router
    .route("/modify")
    .post(userCtrl.modifyUser)

router
한규민's avatar
한규민 committed
34
35
    .route("/member")
    .get(userCtrl.getMember)
36
37
38
39
    
router
        .route("/num")
        .post(userCtrl.confirmNum)
한규민's avatar
한규민 committed
40
41
42
43
router
    .route("/pw/:pw")
    .get(userCtrl.comparePw)

한규민's avatar
한규민 committed
44
router
한규민's avatar
한규민 committed
45
46
    .route("/phone/:phone")
    .post(userCtrl.confirmMbnum)
한규민's avatar
한규민 committed
47

48
49
50

router.route('/getuserinfo')
    .post(userCtrl.getUserInfo)
한규민's avatar
한규민 committed
51

Jiwon Yoon's avatar
Jiwon Yoon committed
52
53
54
router.route('/guest/save')
    .post(userCtrl.saveGuestInfo)

55
56
57
58
59
60
61
router.route('/guestinfo/:guestId')
    .get(userCtrl.getGuestInfo)

router
    .route("/:userId")
    .get(userCtrl.compareId)

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