user.routes.js 484 Bytes
Newer Older
우지원's avatar
우지원 committed
1
2
3
4
5
6
import express from 'express'
import userCtrl from '../controllers/user.controller.js'

const router = express.Router()
//router의 역할 : './주소'부분을 처리하는 역할함. 

우지원's avatar
01_06    
우지원 committed
7
router.route('/users/signup')
우지원's avatar
우지원 committed
8
    .post(userCtrl.signup)
9

Choi Ga Young's avatar
x    
Choi Ga Young committed
10
11
12
13

router.route('/users/check')
    .get(userCtrl.checkUser)

JeongYeonwoo's avatar
JeongYeonwoo committed
14
router.route(`/users/:userId`)
JeongYeonwoo's avatar
JeongYeonwoo committed
15
16
    .get(userCtrl.getProfile)
    .put(userCtrl.profileUpload, userCtrl.update)
Choi Ga Young's avatar
x    
Choi Ga Young committed
17

JeongYeonwoo's avatar
   
JeongYeonwoo committed
18

JeongYeonwoo's avatar
JeongYeonwoo committed
19
20
router.param('userId', userCtrl.userById)

JeongYeonwoo's avatar
JeongYeonwoo committed
21
22


우지원's avatar
우지원 committed
23
export default router