/**
 * Dashboard Routes
 */

const express = require("express");
const router = express.Router();
const { authenticate, authorize } = require("../middleware/authMiddleware");
const dashboardController = require("../controllers/dashboardController");

// Apply authentication
router.use(authenticate);

// Routes
router.get("/admin", authorize("Admin"), dashboardController.getAdminDashboard);
router.get(
  "/manager",
  authorize("Admin", "Manager"),
  dashboardController.getManagerDashboard,
);
router.get("/employee", dashboardController.getEmployeeDashboard);

module.exports = router;
