Fix user registration

This commit is contained in:
René Preuß
2019-12-02 15:26:43 +01:00
parent 918bcd4644
commit 553167d108
4 changed files with 12 additions and 8 deletions

View File

@@ -90,8 +90,9 @@ class BitinflowAccounts
}
/**
* @internal only for internal and debug purposes.
* @param string $baseUrl
*
* @internal only for internal and debug purposes.
*/
public static function setBaseUrl(string $baseUrl): void
{
@@ -398,13 +399,13 @@ class BitinflowAccounts
{
$headers = [
'Client-ID' => $this->getClientId(),
'Accept' => 'application/json',
];
if ($this->token) {
$headers['Authorization'] = 'Bearer ' . $this->token;
}
if ($json) {
$headers['Content-Type'] = 'application/json';
$headers['Accept'] = 'application/json';
}
return $headers;