import express from "express";
import { getDashboardStats, getClientDashboardStats } from "../controllers/dashboardController.js";
import { verifyToken } from "../middleware/authMiddleware.js";
import { adminOnly } from "../middleware/roleMiddleware.js";

const router = express.Router();

// GET /dashboard - admin only
router.get("/", verifyToken, adminOnly, getDashboardStats);

// GET /dashboard/client/stats - client only
router.get("/client/stats", verifyToken, getClientDashboardStats);

export default router;