From d1d72df22748aa71d57f52fc63805ee6f295be5e Mon Sep 17 00:00:00 2001 From: yangyang <36785096+yangxmo@users.noreply.github.com> Date: Sat, 3 Aug 2024 21:58:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BF=AE=E5=A4=8D=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=A4=B1=E8=B4=A5):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=8F=92=E4=BB=B6=E6=97=B6=EF=BC=8C=E5=9B=A0?= =?UTF-8?q?space=E5=AD=97=E6=AE=B5=E9=87=8D=E5=8F=A0=E6=8B=BC=E6=8E=A5?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=8F=92=E4=BB=B6=E8=AF=86=E5=88=AB=E9=94=99?= =?UTF-8?q?=E8=AF=AF=20(#122)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Command/DownloadCommand.php | 3 +-- src/Service/AppStoreService.php | 2 +- src/Service/Impl/AppStoreServiceImpl.php | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Command/DownloadCommand.php b/src/Command/DownloadCommand.php index 13dcb5f..efb049e 100644 --- a/src/Command/DownloadCommand.php +++ b/src/Command/DownloadCommand.php @@ -27,10 +27,9 @@ class DownloadCommand extends AbstractCommand public function __invoke(): int { $identifier = $this->input->getArgument('identifier'); - [$space, $identifier] = explode('/', $identifier); $version = $this->input->getArgument('version'); $appStoreService = ApplicationContext::getContainer()->get(AppStoreService::class); - $appStoreService->download($space, $identifier, $version); + $appStoreService->download($identifier, $version); $this->output->success('Plugin Downloaded Successfully'); return AbstractCommand::SUCCESS; } diff --git a/src/Service/AppStoreService.php b/src/Service/AppStoreService.php index b2fcfc5..3b16fe7 100644 --- a/src/Service/AppStoreService.php +++ b/src/Service/AppStoreService.php @@ -25,7 +25,7 @@ public function request(string $uri, array $data = []): array; /** * Download the specified plug-in to a local directory. */ - public function download(string $space, string $identifier, string $version): bool; + public function download(string $identifier, string $version): bool; /** * Get the details of the specified plugin. diff --git a/src/Service/Impl/AppStoreServiceImpl.php b/src/Service/Impl/AppStoreServiceImpl.php index ac2a404..6cdc1a4 100644 --- a/src/Service/Impl/AppStoreServiceImpl.php +++ b/src/Service/Impl/AppStoreServiceImpl.php @@ -92,7 +92,7 @@ public function getOtherApp(string $username): array /** * Download the specified plug-in to a local directory. */ - public function download(string $space, string $identifier, string $version): bool + public function download(string $identifier, string $version): bool { $localPluginPath = Plugin::PLUGIN_PATH . DIRECTORY_SEPARATOR . $identifier; if (file_exists($localPluginPath)) { @@ -100,7 +100,7 @@ public function download(string $space, string $identifier, string $version): bo } $originData = $this->request(__FUNCTION__, [ - 'identifier' => $space . '/' . $identifier, + 'identifier' => $identifier, 'version' => $version, ]); $downloadResponse = Collection::make($originData);