import { Router } from 'express';
import { authenticate, requirePermission } from '../middleware/auth.js';
import * as emailLogController from '../controllers/emailLog.controller.js';

const router = Router();

router.use(authenticate);

router.get('/', requirePermission('gdpr:admin'), emailLogController.getEmailLogs);
router.get('/stats', requirePermission('gdpr:admin'), emailLogController.getEmailLogStats);
router.get('/:id', requirePermission('gdpr:admin'), emailLogController.getEmailLogDetail);

export default router;
