import { Router } from "express";
import { RoleController } from "./role.controller";
import { authMiddleware } from "../auth/auth.middleware";

const roleRouter = Router();

const controller = new RoleController();

roleRouter.get("/", authMiddleware, controller.getAll);

roleRouter.get("/:id", authMiddleware, controller.getById);

roleRouter.post("/", authMiddleware, controller.create);

roleRouter.put("/:id", authMiddleware, controller.update);

roleRouter.delete("/:id", authMiddleware, controller.delete);

export default roleRouter;