user.routes.js 422 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

JeongYeonwoo's avatar
JeongYeonwoo committed
10
router.route(`/users/:userId`)
JeongYeonwoo's avatar
JeongYeonwoo committed
11
12
    .get(userCtrl.getProfile)
    .put(userCtrl.profileUpload, userCtrl.update)
JeongYeonwoo's avatar
   
JeongYeonwoo committed
13
14


JeongYeonwoo's avatar
JeongYeonwoo committed
15
16
router.param('userId', userCtrl.userById)

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