const express = require('express');
const router  = express.Router();
const { authMiddleware, requireRole } = require('../middleware/auth');
const { getSimSettings, updateSimSettings } = require('../controllers/settingsController');

// GET is open to any authenticated user (students need to check disabled sims)
router.get('/sims', authMiddleware, getSimSettings);

// PUT requires admin
router.put('/sims', authMiddleware, requireRole('admin'), updateSimSettings);

module.exports = router;
