profile.route.ts 429 Bytes
Newer Older
Kim, MinGyu's avatar
Kim, MinGyu committed
1
import express from "express";
Kim, MinGyu's avatar
Kim, MinGyu committed
2
import { userCtrl, authCtrl, fileInfoCtrl } from "../controllers";
Kim, MinGyu's avatar
Kim, MinGyu committed
3
4
5

const router = express.Router();

6
7
8
router
  .route("/")
  .get(authCtrl.requireLogin, userCtrl.getProfile)
Kim, MinGyu's avatar
수정    
Kim, MinGyu committed
9
  .delete(authCtrl.requireLogin, userCtrl.deleteUser)
10
  .post(authCtrl.requireLogin, fileInfoCtrl.uploadFile, userCtrl.updateProfile); //중간에 req쪽에 fields와 files 넣는 미들웨어 추가
Kim, MinGyu's avatar
Kim, MinGyu committed
11
12

export default router;