diff --git a/Classes/Configuration/ImportConfiguration.php b/Classes/Configuration/ImportConfiguration.php index 695406fd..bdfc41ba 100644 --- a/Classes/Configuration/ImportConfiguration.php +++ b/Classes/Configuration/ImportConfiguration.php @@ -24,10 +24,11 @@ class ImportConfiguration private string $storageFolder; - public function __construct(ReactionInstruction $reactionInstruction) + public function __construct(array $payload, ReactionInstruction $reactionInstruction) { $reactionRecord = $reactionInstruction->toArray(); - $this->payload = $reactionRecord['payload'] ?? []; + + $this->payload = $payload; $this->storagePid = (int)($reactionRecord['storage_pid'] ?? 0); $this->storageFolder = $reactionRecord['storage_folder'] ?? ''; } diff --git a/Classes/Reaction/ImportEventsReaction.php b/Classes/Reaction/ImportEventsReaction.php index 77158698..d0e4a2f1 100644 --- a/Classes/Reaction/ImportEventsReaction.php +++ b/Classes/Reaction/ImportEventsReaction.php @@ -49,7 +49,7 @@ public static function getIconIdentifier(): string public function react(ServerRequestInterface $request, array $payload, ReactionInstruction $reaction): ResponseInterface { $statusData = []; - $statusData['success'] = $this->jsonImporter->import(new ImportConfiguration($reaction)); + $statusData['success'] = $this->jsonImporter->import(new ImportConfiguration($payload, $reaction)); if ($statusData['success'] === false) { $statusData['error'] = 'Error while importing events';