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

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
14
  .delete(authCtrl.requireLogin,authCtrl.hasRole("admin"), mainimgCtrl.deleteMainimg)
  .put(authCtrl.requireLogin,authCtrl.hasRole("admin"), mainimgCtrl.updateMainimg);
백승민's avatar
백승민 committed
15

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

export default router;