Skip to content

Commit

Permalink
feat: entity-id header
Browse files Browse the repository at this point in the history
  • Loading branch information
vermorag committed Oct 16, 2024
1 parent 016cdf9 commit d32a1ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CoreApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ public function syncShop(string $authIntToken): string
throw new ShopRegistrationException('[CDEKDelivery] Register shop failed', 'cdek_error.register.shop');
}

if (empty($response->data()['id'])) {
if (empty($response->getHeaders()['X-Entity-Id'])) {
throw new ShopRegistrationException(
'[CDEKDelivery] Failed to get shop uuid', 'cdek_error.uuid.auth', $response->data(),
);
}

return $response->data()['id'];
return $response->getHeaders()['X-Entity-Id'];
}

/**
Expand Down

0 comments on commit d32a1ab

Please sign in to comment.