const express = require('express');
const router = express.Router();
const { authenticateToken } = require('../middleware/auth');
const { requireAdmin } = require('../middleware/roleCheck');
const ctrl = require('../controllers/docker.controller');

router.use(authenticateToken, requireAdmin);
router.get('/containers', ctrl.getContainers);
router.get('/stats', ctrl.getStats);
router.get('/containers/:id/logs', ctrl.getLogs);
router.post('/containers/:id/:action', ctrl.containerAction);

module.exports = router;
