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

import addForklift from "./addForklift.js";
import getForklifts from "./getForklifts.js";
import updateForklift from "./updateForklift.js";

const router = Router();

router.use(
	"/",
	requireAuth("forklifts", ["systemAdmin", "admin", "manager", "supervisor"]),
	getForklifts,
);
router.use(
	"/",
	requireAuth("forklifts", ["systemAdmin", "admin"]),
	addForklift,
);
router.use(
	"/",
	requireAuth("forklifts", ["systemAdmin", "admin"]),
	updateForklift,
);

export default router;
