Skip to content

Commit

Permalink
Optimize download logic (#118)
Browse files Browse the repository at this point in the history
* optimal AppStore download

* Apply cs fix
  • Loading branch information
zds-s authored Jul 19, 2024
1 parent d7f7fc7 commit f913156
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Service/Impl/AppStoreServiceImpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ public function download(string $space, string $identifier, string $version): bo
throw new \RuntimeException(sprintf('The plugin %s already exists', $identifier));
}

$originData = $this->request(__FUNCTION__, compact('identifier', 'version'));
$originData = $this->request(__FUNCTION__, [
'identifier' => $space . '/' . $identifier,
'version' => $version,
]);
$downloadResponse = Collection::make($originData);
if (! $downloadResponse->get('success')) {
throw new \RuntimeException('服务端返回错误' . $downloadResponse->get('message'));
Expand Down

0 comments on commit f913156

Please sign in to comment.