Skip to content

Commit

Permalink
update deepl class apiUrl default param. (#5)
Browse files Browse the repository at this point in the history
with the old default param, the api action would be in the url twice, when the apiCall method is called. But only if the class would be used directly without the service provider. Maybe the defaults in the class constructor should be removed entirely?
  • Loading branch information
Per Steinhorst authored Sep 1, 2021
1 parent 1e58379 commit 89cdbcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Deepl.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Deepl
*/
public function __construct(
protected string $apiToken,
protected string $apiUrl = 'https://api-free.deepl.com/v2/translate',
protected string $apiUrl = 'https://api-free.deepl.com/v2',
protected string $fallbackLocale = 'en'
) {
$this->client = new Client();
Expand Down

0 comments on commit 89cdbcc

Please sign in to comment.