profile.route.ts 452 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)
9
  .post(authCtrl.requireLogin, fileInfoCtrl.uploadFile, userCtrl.updateProfile); //중간에 req쪽에 fields와 files 넣는 미들웨어 추가
Kim, MinGyu's avatar
Kim, MinGyu committed
10

Kim, MinGyu's avatar
Kim, MinGyu committed
11
router.route("/delete").delete(authCtrl.requireLogin, userCtrl.deleteUser);
Kim, MinGyu's avatar
Kim, MinGyu committed
12

Kim, MinGyu's avatar
Kim, MinGyu committed
13
export default router;