mirror of
https://gh.wpcy.net/https://github.com/fairpm/aspirecloud.git
synced 2026-06-20 02:22:28 +08:00
25 lines
715 B
PHP
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,
|
|
);
|
|
}
|
|
}
|