const express = require('express'); const router = express.Router(); const { getConfig, updateConfig, getWebhooks, createWebhook, removeWebhook } = require('../controllers/yocoController'); const { protect, admin } = require('../middleware/authMiddleware'); router.get('/config', protect, admin, getConfig); router.put('/config', protect, admin, updateConfig); router.get('/webhooks', protect, admin, getWebhooks); router.post('/webhooks', protect, admin, createWebhook); router.delete('/webhooks/:id', protect, admin, removeWebhook); module.exports = router;