const express = require('express');
const router = express.Router();
const { getProxy, getFeed } = require('../controllers/newsController');
const { signupBeta } = require('../controllers/newsletterController');
// const { protect } = require('../middleware/authMiddleware'); // Removed for public access

// Public route or protected? Given it's a "Cybersecurity News" feature in the platform, 
// usually it's fine to be public OR protected. Let's make it protected to prevent abuse of our proxy by outsiders.
router.get('/proxy', getProxy);

// Public route for RSS Feed Aggregation
router.get('/feed', getFeed);

// Public route for beta signup
router.post('/beta-signup', signupBeta);

module.exports = router;
