role.route.ts 253 Bytes
Newer Older
Yoon, Daeki's avatar
Yoon, Daeki committed
1
2
3
4
5
6
7
8
9
10
import express from "express";
import { authCtrl, roleCtrl } from "../controllers";

const router = express.Router();

router.all("/", authCtrl.requireLogin);

router.route("/").get(authCtrl.hasRole("admin"), roleCtrl.getRoles);

export default router;