const express = require('express');
const router = express.Router();
const referralController = require('../controllers/referralController');
const { protect, admin } = require('../middleware/authMiddleware');

router.get('/stats', protect, referralController.getStats);

// Admin Routes
router.get('/admin/all', protect, admin, referralController.getAllReferrals);
router.get('/admin/user/:id', protect, admin, referralController.getUserReferralDetails);

module.exports = router;
