|
| 1 | +diff --git a/vendor/magento/module-webapi-async/Controller/Rest/Asynchronous/InputParamsResolver.php b/vendor/magento/module-webapi-async/Controller/Rest/Asynchronous/InputParamsResolver.php |
| 2 | +index 93555559ac9a1..2f46685c6b117 100644 |
| 3 | +--- a/vendor/magento/module-webapi-async/Controller/Rest/Asynchronous/InputParamsResolver.php |
| 4 | ++++ b/vendor/magento/module-webapi-async/Controller/Rest/Asynchronous/InputParamsResolver.php |
| 5 | +@@ -70,6 +70,11 @@ class InputParamsResolver |
| 6 | + */ |
| 7 | + private $methodsMap; |
| 8 | + |
| 9 | ++ /** |
| 10 | ++ * @var array |
| 11 | ++ */ |
| 12 | ++ private array $inputData = []; |
| 13 | ++ |
| 14 | + /** |
| 15 | + * Initialize dependencies. |
| 16 | + * |
| 17 | +@@ -156,8 +161,14 @@ public function resolve() |
| 18 | + */ |
| 19 | + public function getInputData() |
| 20 | + { |
| 21 | ++ if (!empty($this->inputData)) { |
| 22 | ++ return $this->inputData; |
| 23 | ++ } |
| 24 | ++ |
| 25 | + if ($this->isBulk === false) { |
| 26 | +- return [$this->inputParamsResolver->getInputData()]; |
| 27 | ++ $this->inputData = [$this->inputParamsResolver->getInputData()]; |
| 28 | ++ |
| 29 | ++ return $this->inputData; |
| 30 | + } |
| 31 | + $inputData = $this->request->getRequestData(); |
| 32 | + |
| 33 | +@@ -167,7 +178,7 @@ public function getInputData() |
| 34 | + $inputData = array_merge($requestBodyParams, $inputData); |
| 35 | + } |
| 36 | + |
| 37 | +- return array_map(function ($singleEntityParams) { |
| 38 | ++ $this->inputData = array_map(function ($singleEntityParams) { |
| 39 | + if (is_array($singleEntityParams)) { |
| 40 | + $singleEntityParams = $this->filterInputData($singleEntityParams); |
| 41 | + $singleEntityParams = $this->paramsOverrider->override( |
| 42 | +@@ -178,6 +189,8 @@ public function getInputData() |
| 43 | + |
| 44 | + return $singleEntityParams; |
| 45 | + }, $inputData); |
| 46 | ++ |
| 47 | ++ return $this->inputData; |
| 48 | + } |
| 49 | + |
| 50 | + /** |
0 commit comments