mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-15 01:20:59 +00:00
[API] Change endpoint for customer verification
This commit is contained in:
parent
295901a0cd
commit
0bc418fd88
4 changed files with 8 additions and 8 deletions
|
|
@ -457,7 +457,7 @@ final class CustomerContext implements Context
|
|||
private function verifyAccount(string $token): void
|
||||
{
|
||||
$request = $this->requestFactory->custom(
|
||||
\sprintf('%s/shop/account-verification-requests/%s', $this->apiUrlPrefix, $token),
|
||||
\sprintf('%s/shop/customers/verify/%s', $this->apiUrlPrefix, $token),
|
||||
HttpRequest::METHOD_PATCH,
|
||||
);
|
||||
|
||||
|
|
@ -480,7 +480,7 @@ final class CustomerContext implements Context
|
|||
|
||||
private function resendVerificationEmail(string $email): void
|
||||
{
|
||||
$request = $this->requestFactory->create('shop', 'account-verification-requests', 'Bearer');
|
||||
$request = $this->requestFactory->create('shop', 'customers/verify', 'Bearer');
|
||||
|
||||
$request->setContent(['email' => $email]);
|
||||
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ final class RegistrationContext implements Context
|
|||
$token = $customer->getUser()->getEmailVerificationToken();
|
||||
|
||||
$request = $this->requestFactory->custom(
|
||||
\sprintf('%s/shop/account-verification-requests/%s', $this->apiUrlPrefix, $token),
|
||||
\sprintf('%s/shop/customers/verify/%s', $this->apiUrlPrefix, $token),
|
||||
HttpRequest::METHOD_PATCH,
|
||||
);
|
||||
$this->shopClient->executeCustomRequest($request);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<collectionOperations>
|
||||
<collectionOperation name="shop_resend_verification_email">
|
||||
<attribute name="method">POST</attribute>
|
||||
<attribute name="path">/account-verification-requests</attribute>
|
||||
<attribute name="path">/customers/verify</attribute>
|
||||
<attribute name="input">Sylius\Bundle\ApiBundle\Command\Account\ResendVerificationEmail</attribute>
|
||||
<attribute name="status">202</attribute>
|
||||
<attribute name="denormalization_context">
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
<itemOperations>
|
||||
<itemOperation name="shop_verify_customer_account">
|
||||
<attribute name="method">PATCH</attribute>
|
||||
<attribute name="path">/account-verification-requests/{token}</attribute>
|
||||
<attribute name="path">/customers/verify/{token}</attribute>
|
||||
<attribute name="input">Sylius\Bundle\ApiBundle\Command\Account\VerifyCustomerAccount</attribute>
|
||||
<attribute name="status">202</attribute>
|
||||
<attribute name="denormalization_context">
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ final class VerifyCustomerAccountsTest extends JsonApiTestCase
|
|||
|
||||
$this->client->request(
|
||||
method: 'POST',
|
||||
uri: '/api/v2/shop/account-verification-requests',
|
||||
uri: '/api/v2/shop/customers/verify',
|
||||
server: $header,
|
||||
content: '{}',
|
||||
);
|
||||
|
|
@ -49,7 +49,7 @@ final class VerifyCustomerAccountsTest extends JsonApiTestCase
|
|||
|
||||
$this->client->request(
|
||||
method: 'POST',
|
||||
uri: '/api/v2/shop/account-verification-requests',
|
||||
uri: '/api/v2/shop/customers/verify',
|
||||
server: self::CONTENT_TYPE_HEADER,
|
||||
);
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ final class VerifyCustomerAccountsTest extends JsonApiTestCase
|
|||
|
||||
$this->client->request(
|
||||
method: 'PATCH',
|
||||
uri: '/api/v2/shop/account-verification-requests/token',
|
||||
uri: '/api/v2/shop/customers/verify/token',
|
||||
server: self::PATCH_CONTENT_TYPE_HEADER,
|
||||
content: '{}',
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue