const express = require('express');
const router = express.Router();
const settingController = require('../controllers/settingController');
const { authMiddleware } = require('../middlewares/authMiddleware');

// Semua routes settings memerlukan autentikasi
router.get('/', authMiddleware, settingController.getSettings);
router.put('/bulk', authMiddleware, settingController.updateSettingsBulk);
router.put('/:key', authMiddleware, settingController.updateSetting);
router.post('/email/test', authMiddleware, settingController.testEmailConnection);

module.exports = router;
