const express = require('express');
const router = express.Router();
const { getConfig, getFullConfig, updateConfig, uploadLogo, deleteLogo } = require('../controllers/configController');
const { authenticateToken } = require('../middleware/auth');

// Public routes
router.get('/', getConfig);

// Protected routes (admin only)
router.get('/admin', authenticateToken, getFullConfig);
router.put('/', authenticateToken, updateConfig);
router.post('/logo', authenticateToken, uploadLogo);
router.delete('/logo', authenticateToken, deleteLogo);

module.exports = router;