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

const router = express.Router();

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

export default router;
