Skip to content

Commit 6049c52

Browse files
authored
Merge pull request PrestaShop#48 from boherm/fix-cart-rule-endpoint
2 parents 6093511 + 107cb6a commit 6049c52

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ApiPlatform/Resources/CartRule.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
namespace PrestaShop\Module\APIResources\ApiPlatform\Resources;
2424

25+
use ApiPlatform\Metadata\ApiProperty;
2526
use ApiPlatform\Metadata\ApiResource;
2627
use PrestaShop\PrestaShop\Core\Domain\CartRule\Command\EditCartRuleCommand;
2728
use PrestaShopBundle\ApiPlatform\Metadata\CQRSUpdate;
@@ -30,7 +31,7 @@
3031
#[ApiResource(
3132
operations: [
3233
new CQRSUpdate(
33-
uriTemplate: '/cart-rule',
34+
uriTemplate: '/cart-rule/{cartRuleId}',
3435
CQRSCommand: EditCartRuleCommand::class,
3536
scopes: [
3637
'cart_rule_write',
@@ -41,6 +42,7 @@
4142
)]
4243
class CartRule
4344
{
45+
#[ApiProperty(identifier: true)]
4446
public int $cartRuleId;
4547

4648
public string $description;

0 commit comments

Comments
 (0)