Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Feb 8, 2022
1 parent 37d7ee9 commit 769bbcf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ abstract class Request extends \Laravie\Codex\Request implements Filterable
/**
* Get URI Endpoint.
*
* @param array|string $path
* @param array<int, string>|string $path
*/
protected function getApiEndpoint($path = []): Endpoint
{
return parent::getApiEndpoint([$this->getVersion(), $path])
$paths = is_array($path) ? $path : [$path];

array_unshift($paths, $this->getVersion());

return parent::getApiEndpoint($paths)
->withUserInfo($this->client->getApiKey());
}

Expand Down

0 comments on commit 769bbcf

Please sign in to comment.