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

router.get('/',                    authenticateToken, requireAdmin, ctrl.getAll);
router.post('/:id/acknowledge',    authenticateToken, requireAdmin, ctrl.acknowledge);
router.post('/:id/create-ticket',  authenticateToken, requireAdmin, ctrl.createTicket);
router.delete('/:id',              authenticateToken, requireAdmin, ctrl.remove);

module.exports = router;
