Fix: Adopt changes in API client response handling

This commit is contained in:
Björn Fromme
2023-10-03 16:39:07 +02:00
parent 96dbb875a0
commit 5d2af16b79
+4 -4
View File
@@ -34,7 +34,7 @@ class ApiClient
/** /**
* @throws ApiClientException * @throws ApiClientException
*/ */
public function getProfile(string $email, string $password): ProfileResponse public function getProfile(string $email, string $password): NotificationResponse|ProfileResponse
{ {
$data = [ $data = [
'anfrage' => [ 'anfrage' => [
@@ -53,7 +53,7 @@ class ApiClient
/** /**
* @throws ApiClientException * @throws ApiClientException
*/ */
public function updateProfile(User $user, string $password): ProfileResponse public function updateProfile(User $user, string $password): NotificationResponse|ProfileResponse
{ {
if (null === $teamer = $user->getTeamer()) { if (null === $teamer = $user->getTeamer()) {
throw new ApiClientException('Invalid argument'); throw new ApiClientException('Invalid argument');
@@ -96,7 +96,7 @@ class ApiClient
/** /**
* @throws ApiClientException * @throws ApiClientException
*/ */
public function getCrmAttributes(string $email, string $password): CrmAttributesResponse public function getCrmAttributes(string $email, string $password): NotificationResponse|CrmAttributesResponse
{ {
$data = [ $data = [
'anfrage' => [ 'anfrage' => [
@@ -115,7 +115,7 @@ class ApiClient
/** /**
* @throws ApiClientException * @throws ApiClientException
*/ */
public function getBaseData(string $type): BaseDataResponse public function getBaseData(string $type): NotificationResponse|BaseDataResponse
{ {
$data = [ $data = [
'anfrage' => [ 'anfrage' => [