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

const router = express.Router();

6
7
8
9
router
  .route("/")
  .get(authCtrl.requireLogin, userCtrl.getProfile)
  .post(authCtrl.requireLogin, 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;