const express = require("express");
const requireAuth = require("../middleware/authMiddleware");
const {
  createEmployee,
  getEmployees,
  getEmployee,
  updateEmployee,
  deleteEmployee
} = require("../controllers/employeeController");

const router = express.Router();

router.post("/", requireAuth, createEmployee);
router.get("/", requireAuth, getEmployees);
router.get("/:id", requireAuth, getEmployee);
router.put("/:id", requireAuth, updateEmployee);
router.delete("/:id", requireAuth, deleteEmployee);

module.exports = router;
