const express = require('express');
const router = express.Router();
const {
  checkConsent,
  saveConsent,
  getAllConsents,
  getStats
} = require('../controllers/cookieConsentController');
const { protect } = require('../middleware/authMiddleware');

// Public routes
router.get('/check', checkConsent);
router.post('/save', saveConsent);

// Admin routes (protected)
router.get('/all', protect, getAllConsents);
router.get('/stats', protect, getStats);

module.exports = router;
