wip-feat: dispatches monitor commands for episodes, seasons, & shows

This commit is contained in:
2025-05-06 00:00:45 -05:00
parent 9166b4bbc8
commit 527adb73c1
33 changed files with 795 additions and 147 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Download\Framework\Controller;
use App\Download\Action\Handler\AddMonitorHandler;
use App\Download\Action\Input\AddMonitorInput;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Attribute\Route;
class ApiController extends AbstractController
{
#[Route('/monitor', name: 'app_add_movie_monitor', methods: ['POST'])]
public function addMonitor(
AddMonitorInput $input,
AddMonitorHandler $handler,
) {
$response = $handler->handle($input->toCommand());
return $this->json([
'status' => 200,
'message' => $response
]);
}
}