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

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