call backend bug

This commit is contained in:
CHIEFSOFT\ameye
2023-06-02 16:44:37 -04:00
parent 14cab76805
commit eb9b8e5e3c
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -474,7 +474,7 @@ class WrenchApi extends BaseController
$raw_array = json_decode($raw_json, true);
$raw_array["call_backend"] = $call_backend;
$ll = ( new \App\Models\UploadManager() )->reciveUpload($raw_array, $local_out);
$raw_array["call_backend"] = $local_out["call_backend"];
$call_backend = $local_out["call_backend"];
$raw_array["message"] = $local_out["message"];
}
if (isset($_FILES) && is_array($_FILES) && count($_FILES)>0) {
+6 -6
View File
@@ -138,12 +138,12 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$local_out=["test_msg"=>'Yes the upload endpoint was hit******** 777'];
$call_backend = false; // will be decided after file is saved
$raw_json = flatten(json_decode(file_get_contents('php://input'), true));
$raw_array = json_decode($raw_json, true);
$raw_array["call_backend"] = $call_backend;
$ll = reciveUpload($raw_array, $local_out);
$raw_array["call_backend"] = $local_out["call_backend"];
$raw_array["message"] = $local_out["message"];
$in = flatten(json_decode(file_get_contents('php://input'), true));
//$in = json_decode($raw_json, true);
$in["call_backend"] = $call_backend;
$ll = reciveUpload($in, $local_out);
$call_backend = $local_out["call_backend"];
$in["message"] = $local_out["message"];
}
else{