]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Правки формата ответа
authorAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Thu, 9 Oct 2025 13:07:33 +0000 (16:07 +0300)
committerAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Thu, 9 Oct 2025 13:07:33 +0000 (16:07 +0300)
erp24/api2/controllers/OrdersController.php

index 08bd797d71405af704fdf3be23f274324ca82863..5cbf4360624a2ed93c4adc116599e24dd41c5027 100644 (file)
@@ -270,12 +270,13 @@ class OrdersController extends BaseController
                     'items' => $items,
                 ];
             }
+            $resultLog = $result;
             if (empty($jsonId)) {
-                $result['line'][] = __LINE__;
+                $resultLog['line'][] = __LINE__;
                 $jsonId = time();
             }
-            LogService::apiDataLogs(1, json_encode($result, JSON_UNESCAPED_UNICODE), $jsonId);
-            $result = $result ?? json_encode($result, JSON_UNESCAPED_UNICODE);
+            LogService::apiDataLogs(1, json_encode($resultLog, JSON_UNESCAPED_UNICODE), $jsonId);
+            $result = json_encode($result, JSON_UNESCAPED_UNICODE);
             return [
                 'success' => true,
                 'result' => $result,