import express from "express";
import { User } from "$controllers/index.js";
import { checkPermission } from "$middlewares/index.js";

const router = express.Router();

router.get("/", checkPermission("users:view"), User.ALL);
router.get("/:id", checkPermission("users:view"), User.SINGLE);
router.post("/", checkPermission("users:create"), User.CREATE);
router.put("/:id", checkPermission("users:update"), User.UPDATE);
router.delete("/:id", checkPermission("users:delete"), User.DELETE);

export default router;
