diff --git a/src/Monitor/Framework/Controller/ApiController.php b/src/Monitor/Framework/Controller/ApiController.php index 599ae2f..a3e2226 100644 --- a/src/Monitor/Framework/Controller/ApiController.php +++ b/src/Monitor/Framework/Controller/ApiController.php @@ -2,17 +2,13 @@ namespace App\Monitor\Framework\Controller; -use App\Download\Action\Input\DeleteDownloadInput; use App\Monitor\Action\Handler\AddMonitorHandler; use App\Monitor\Action\Handler\DeleteMonitorHandler; use App\Monitor\Action\Input\AddMonitorInput; use App\Monitor\Action\Input\DeleteMonitorInput; use App\Util\Broadcaster; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Bundle\SecurityBundle\Security; -use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Component\Mercure\HubInterface; -use Symfony\Component\Mercure\Update; use Symfony\Component\Routing\Attribute\Route; class ApiController extends AbstractController @@ -46,19 +42,9 @@ class ApiController extends AbstractController public function deleteMonitor( DeleteMonitorInput $input, DeleteMonitorHandler $handler, - HubInterface $hub, ) { $response = $handler->handle($input->toCommand()); - $hub->publish(new Update( - 'alerts', - $this->renderer->render('broadcast/Alert.stream.html.twig', [ - 'alert_id' => uniqid(), - 'title' => 'Success', - 'message' => "New monitor added for {$response->monitor->getTitle()}", - ]) - )); - return $this->json([ 'status' => 200, 'message' => $response