Commit f5f8f2b1 authored by Yoon, Daeki's avatar Yoon, Daeki 😅
Browse files

역할 라우트 기능 추가

parent 6050aa37
import express from "express";
import userRouter from "./user.route";
import authRouter from "./auth.route";
import roleRouter from "./role.route";
const router = express.Router();
router.use("/users", userRouter);
router.use("/auth", authRouter);
router.use("/roles", roleRouter);
router.use("/users", userRouter);
export default router;
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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment