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

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

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