const express = require('express');
const DashboardController = require('../controllers/dashboardController');
const { authenticateToken } = require('../middleware/auth');
const { requirePermission } = require('../middleware/authorization');
const router = express.Router();
// Apply authentication middleware to all dashboard routes
router.use(authenticateToken);
// Get dashboard statistics
// GET /api/dashboard/stats
router.get('/stats', requirePermission('dashboard.view'), DashboardController.getDashboardStats);
// Get dashboard analytics for charts
// GET /api/dashboard/analytics?period=7d
router.get('/analytics', requirePermission('dashboard.view'), DashboardController.getDashboardAnalytics);
module.exports = router;
//# sourceMappingURL=dashboard.js.map