Skip to content

Commit 107cb6a

Browse files
committed
Add cartRuleId in PUT CartRule endpoint
1 parent 6093511 commit 107cb6a

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)