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

const router = express.Router();

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

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

export default router;