From e06055c5803b637c2af9771c5095e52b759675c2 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sat, 3 Jun 2023 18:54:39 -0400 Subject: [PATCH] Moned out position --- www-api/app/Controllers/WrenchApi.php | 4 ++-- www-api/public/svs/user/userve.php | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/www-api/app/Controllers/WrenchApi.php b/www-api/app/Controllers/WrenchApi.php index 4c03ee14..6129505e 100644 --- a/www-api/app/Controllers/WrenchApi.php +++ b/www-api/app/Controllers/WrenchApi.php @@ -453,7 +453,7 @@ class WrenchApi extends BaseController log_message('critical', "Enpoint-> ".$endpoint ); $endpoints = $this->endPointList(); - + $out = array(); $res1 = []; if (array_key_exists($endpoint, $endpoints)) { } else { @@ -500,7 +500,7 @@ class WrenchApi extends BaseController $in["loc"] = $_SERVER["REMOTE_ADDR"]; $in = $this->prepareEndPointData($endpoint, $raw_array,$call_backend,$local_out); log_message('critical', "wrenchboard_api-CALL PREPARE DATA".serialize($in) ); - $out = array(); + if ( $call_backend == true && $in["action"] !='' ){ $wrenchboard = new \App\Models\BackendModel(); diff --git a/www-api/public/svs/user/userve.php b/www-api/public/svs/user/userve.php index 09ebbf96..0bc01774 100755 --- a/www-api/public/svs/user/userve.php +++ b/www-api/public/svs/user/userve.php @@ -133,6 +133,8 @@ if (array_search($_SERVER['REQUEST_METHOD'], $methods) === false) { exit(); } +$out = array(); + if ($_SERVER["REQUEST_METHOD"] == "POST") { if ( $endpoint == 'uploads'){ $local_out=["test_msg"=>'Yes the upload endpoint was hit******** 777']; @@ -460,7 +462,7 @@ $in["pid"] = 100; //file_put_contents("in_debug.log", $in); // DEBUG -$out = array(); + if ( $call_backend == true && $in["action"] !='' ){ $ret = $wrenchboard->wrenchboard_api($in, $out); $out['internal_return'] = $ret; // this is reserved array parameter - to be captured and received before you use the out array()