Skip to content

Commit

Permalink
Adjusting the url params to match the expected format.
Browse files Browse the repository at this point in the history
  • Loading branch information
tehnorm committed Apr 27, 2023
1 parent 96397ab commit 260ad73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PostgrestClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class PostgrestClient
private $fetch;
private $domain;

public function __construct($reference_id, $api_key, $opts = [], $domain = '.supabase.co', $scheme = 'https://', $path = '/rest/v1/')
public function __construct($reference_id, $api_key, $opts = [], $domain = 'supabase.co', $scheme = 'https', $path = '/rest/v1/')
{
$this->url = Url::fromString($scheme.$reference_id.$domain);
$this->url = Url::fromString("{$scheme}://{$reference_id}.{$domain}");
$headers = ['Authorization' => "Bearer {$api_key}", 'apikey'=>$api_key];
$this->headers = array_merge(Constants::getDefaultHeaders(), $headers);

Expand Down

0 comments on commit 260ad73

Please sign in to comment.