Skip to content

Commit

Permalink
chore(api): update cart rules with custom operation
Browse files Browse the repository at this point in the history
  • Loading branch information
tleon committed Feb 15, 2024
1 parent ad15b67 commit cedfa6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ApiPlatform/Resources/CartRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
namespace PrestaShop\Module\APIResources\ApiPlatform\Resources;

use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Put;
use PrestaShop\PrestaShop\Core\Domain\CartRule\Command\EditCartRuleCommand;
use PrestaShopBundle\ApiPlatform\Metadata\CQRSPartialUpdate;
use PrestaShopBundle\ApiPlatform\Processor\CommandProcessor;

#[ApiResource(
operations: [
new Put(
new CQRSPartialUpdate(
uriTemplate: '/cart-rule',
processor: CommandProcessor::class,
extraProperties: ['CQRSCommand' => EditCartRuleCommand::class]
CQRSCommand: EditCartRuleCommand::class
),
],
)]
Expand Down

0 comments on commit cedfa6d

Please sign in to comment.