Config file use

This commit is contained in:
CHIEFSOFT\ameye
2023-06-03 18:30:52 -04:00
parent dfe6a6f9c8
commit c9463cca0f
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -473,6 +473,7 @@ class WrenchApi extends BaseController
$raw_json = file_get_contents('php://input');
$raw_array = json_decode($raw_json, true);
$raw_array["call_backend"] = $call_backend;
$out["system_primary_uploads"] = $this->getSiteConfigurations("system.primary_uploads");
$out = ( new \App\Models\UploadManager() )->reciveUpload($raw_array, $local_out);
$call_backend = $out["call_backend"];
$raw_array["message"] = $out["message"];
@@ -515,6 +516,11 @@ class WrenchApi extends BaseController
}
private function getSiteConfigurations($config_item){
$wrenchboard = new \App\Models\BackendModel();
return $wrenchboard->cfgReadChar($config_item);
}
private function dummyData($raw_array)
{
return [
+6
View File
@@ -141,6 +141,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$in = flatten(json_decode(file_get_contents('php://input'), true));
//$in = json_decode($raw_json, true);
$in["call_backend"] = $call_backend;
$out["system_primary_uploads"] = getSiteConfigurations($wrenchboard,"system.primary_uploads");
$out = reciveUpload($in, $local_out);
$call_backend = $out["call_backend"];
$in["message"] = $out["message"];
@@ -470,6 +471,11 @@ else
$out['internal_return'] = 100; // to match the other
}
function getSiteConfigurations($wrenchboard,$config_item){
return $wrenchboard->cfgReadChar($config_item);
}
// system.primary_uploads
header("HTTP/1.1 200 OK");
header("Status: 200 OK");