feat: button to add movie monitor
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Download\Action\Command\AddMovieMonitorCommand;
|
||||
use App\Download\Action\Handler\AddMovieMonitorHandler;
|
||||
use App\Download\Action\Input\AddMovieMonitorInput;
|
||||
use App\Download\Action\Input\DownloadMediaInput;
|
||||
use App\Download\Framework\Repository\DownloadRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
@@ -37,4 +40,16 @@ class DownloadController extends AbstractController
|
||||
|
||||
return $this->json(['status' => 200, 'message' => 'Added to Queue']);
|
||||
}
|
||||
|
||||
#[Route('/monitor/movies/{tmdbId}/{imdbId}/{title}', name: 'app_add_movie_monitor', methods: ['GET', 'POST'])]
|
||||
public function addMonitor(
|
||||
AddMovieMonitorInput $input,
|
||||
AddMovieMonitorHandler $handler,
|
||||
) {
|
||||
$handler->handle($input->toCommand());
|
||||
return $this->json([
|
||||
'status' => 200,
|
||||
'message' => $input
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user