import { Router } from 'express';
import { getRecentAuditLogs, getAuditActions, getAuditResources } from '../controllers/audit.controller.js';
import { authenticate } from '../middlewares/auth/authMiddleware.js';
import { requireAdmin } from '../middlewares/auth/roleMiddleware.js';

const router = Router();

// Audit logs are admin only
router.get('/', authenticate, requireAdmin, getRecentAuditLogs);
router.get('/actions', authenticate, requireAdmin, getAuditActions);
router.get('/resources', authenticate, requireAdmin, getAuditResources);

export default router;
