fix-feat: ajax download call

This commit is contained in:
2025-04-23 16:17:03 -05:00
parent 5402680abf
commit 6dc6fbd449
15 changed files with 153 additions and 19 deletions

View File

@@ -18,7 +18,11 @@ class DownloadController extends AbstractController
public function download(
DownloadMediaInput $input,
): Response {
$this->bus->dispatch($input->toCommand());
try {
$this->bus->dispatch($input->toCommand());
} catch (\Throwable $exception) {
return $this->json(['error' => $exception->getMessage()], Response::HTTP_INTERNAL_SERVER_ERROR);
}
return $this->json(['status' => 200, 'message' => 'Added to Queue']);
}