import { Router } from "express";

import { reconciliationsController } from "../controllers/treasuryController.js";
import { asyncHandler } from "../utils/asyncHandler.js";

const router = Router();

router.get("/", asyncHandler(reconciliationsController.list));
router.post("/", asyncHandler(reconciliationsController.create));
router.get("/:id", asyncHandler(reconciliationsController.getById));
router.put("/:id", asyncHandler(reconciliationsController.update));
router.post("/:id/close", asyncHandler(reconciliationsController.close));

export default router;
