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

const router = express.Router();

router.get("/", checkPermission("certificates:view"), Certificate.ALL);
router.get(
  "/:id/download",
  checkPermission("certificates:view"),
  Certificate.DOWNLOAD,
);
router.get("/:id", checkPermission("certificates:view"), Certificate.SINGLE);
router.post("/", checkPermission("certificates:create"), Certificate.CREATE);

export default router;
