Skip to content

Commit

Permalink
PCA-43: ♻️ Fix Download API
Browse files Browse the repository at this point in the history
  • Loading branch information
jmleroux committed Aug 25, 2023
1 parent 7d877b2 commit a709f07
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/Akeneo/Crowdin/Api/Download.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,14 @@ public function execute(): string
if (null !== $this->branch) {
$path = sprintf('%s&branch=%s', $path, $this->branch);
}
$response = $this->client->getHttpClient()->request(
'GET',
$path,
[
'sink' => $this->getCopyDestination() . '/' . $this->getPackage(),
]
);

return $response->getContent();
$filePath = $this->getCopyDestination() . '/' . $this->getPackage();
$response = $this->client->getHttpClient()->request('GET', $path);

$fileContent = $response->getContent();
file_put_contents($filePath, $fileContent);

return $fileContent;
}

public function setPackage(string $package): static
Expand Down

0 comments on commit a709f07

Please sign in to comment.