import { Router } from "express";
import { requireAuth } from "../../../../pkg/middleware/authMiddleware.js";

import addLeases from "./addLease.js";
import getLeases from "./getLeases.js";
import updateLeases from "./updateLease.js";

const router = Router();

router.use("/", requireAuth("forklifts", ["systemAdmin", "admin"]), getLeases);
router.use("/", requireAuth("forklifts", ["systemAdmin", "admin"]), addLeases);
router.use(
	"/",
	requireAuth("forklifts", ["systemAdmin", "admin"]),
	updateLeases,
);

export default router;
