import { Router } from "express";
import { listNotaries, renewNotary, updateNotary, resetNotaryPassword } from "../controllers/notary.controller.js";
import { authenticate, requireRole } from "../middleware/auth.middleware.js";

const router = Router();
router.get("/", authenticate, listNotaries);
router.patch("/:id/renew", authenticate, requireRole('ministry_justice', 'super_admin'), renewNotary);
router.patch("/:id/reset-password", authenticate, requireRole('ministry_justice', 'super_admin'), resetNotaryPassword);
router.put("/:id", authenticate, requireRole('ministry_justice', 'super_admin'), updateNotary);

export default router;
