aspirecloud/app/Http/Controllers/API/WpOrg/Downloads/DownloadThemeScreenshotController.php
2025-10-25 13:15:51 -06:00

25 lines
715 B
PHP

<?php
declare(strict_types=1);
namespace App\Http\Controllers\API\WpOrg\Downloads;
use App\Enums\AssetType;
use App\Services\Downloads\DownloadService;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class DownloadThemeScreenshotController
{
public function __construct(private readonly DownloadService $downloadService) {}
public function __invoke(Request $request, string $slug, string $revision, string $file): Response
{
return $this->downloadService->download(
request: $request,
type: AssetType::THEME_SCREENSHOT,
slug: $slug,
file: $file,
revision: $revision,
);
}
}