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

const router = express.Router();

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

export default router;
