const { Router } = require("express");
const { authMiddleware } = require("../middlewares/auth.middleware");
const { authorizeRoles } = require("../middlewares/role.middleware");
const { getDashboardData, getStudentDashboard, getTeacherDashboard, getAccountantDashboardData } = require("../controllers/dashboard.controller");

const dashboardRouter = Router();

dashboardRouter.get("/student", authMiddleware, authorizeRoles("student"), getStudentDashboard);
dashboardRouter.get("/teacher", authMiddleware, authorizeRoles("teacher"), getTeacherDashboard);
dashboardRouter.get("/admin", authMiddleware, authorizeRoles("admin"), getDashboardData);
dashboardRouter.get("/accountant", authMiddleware, authorizeRoles("accountant"), getAccountantDashboardData);

module.exports = dashboardRouter;
