const express = require("express");
const requireAuth = require("../middleware/authMiddleware");
const {
  createPayroll,
  getPayrolls,
  getPayroll,
  updatePayroll,
  deletePayroll
} = require("../controllers/payrollController");

const router = express.Router();

router.post("/", requireAuth, createPayroll);
router.get("/", requireAuth, getPayrolls);
router.get("/:id", requireAuth, getPayroll);
router.put("/:id", requireAuth, updatePayroll);
router.delete("/:id", requireAuth, deletePayroll);

module.exports = router;
