Skip to content

Commit

Permalink
Extending content lists webhook payload with modified articles
Browse files Browse the repository at this point in the history
information
  • Loading branch information
IvanJelicSF committed Jan 16, 2025
1 parent f689326 commit 7a179c7
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,21 @@ public function batchUpdateAction(
}

$updatedArticles = [];
$updatedItemsInvalidateCache = [];
/** @var ContentListAction $item */
foreach ($data['items'] as $item) {
$position = $item->getPosition();
$isSticky = $item->isSticky();
$contentId = $item->getContentId();

$updatedItemsInvalidateCache[] = [
'id' => $contentId,
'action' => $item->getAction(),
'sticky' => $item->isSticky(),
'postition' => $item->getPosition()
];


switch ($item->getAction()) {
case ContentListAction::ACTION_MOVE:
$updated = false;
Expand Down Expand Up @@ -268,7 +277,8 @@ public function batchUpdateAction(
'id' => $list->getId(),
'name' => $list->getName(),
'type' => $list->getType(),
'action' => 'BATCH-UPDATE'
'action' => 'BATCH-UPDATE',
'items' => $updatedItemsInvalidateCache
]
);

Expand Down

0 comments on commit 7a179c7

Please sign in to comment.