mainimg.route.ts 522 Bytes
Newer Older
백승민's avatar
백승민 committed
1
import express from "express";
백승민's avatar
백승민 committed
2
import { mainimgCtrl, authCtrl, fileInfoCtrl } from "../controllers";
백승민's avatar
백승민 committed
3
4
5
6
7

const router = express.Router();

router
  .route("/")
백승민's avatar
백승민 committed
8
9
  .get( mainimgCtrl.getMainimg)
  .post(authCtrl.requireLogin,authCtrl.hasRole("admin"), mainimgCtrl.createMainimg)
백승민's avatar
백승민 committed
10
11
12
  
router
  .route("/:imgId")
백승민's avatar
백승민 committed
13
  .delete(authCtrl.requireLogin,authCtrl.hasRole("admin"), mainimgCtrl.deleteMainimg)
백승민's avatar
백승민 committed
14
  .put(authCtrl.requireLogin,authCtrl.hasRole("admin"),fileInfoCtrl.uploadFile, mainimgCtrl.updateMainimg);
백승민's avatar
백승민 committed
15

백승민's avatar
백승민 committed
16
17

export default router;