API Request

This commit is contained in:
JonatanRek 2020-02-13 13:35:15 +01:00
parent bc54e33621
commit 1b5630215b
2 changed files with 3 additions and 2 deletions

View File

@ -38,8 +38,8 @@ Db::connect (DBHOST, DBUSER, DBPASS, DBNAME);
//Read API data
$json = file_get_contents('php://input');
$obj = json_decode($json, true);
$logManager->write("[INFO] Rest API request body" . $json, LogRecordType::INFO);
$logManager->write("[INFO] Rest API request body -> decodet to json" . var_export($obj), LogRecordType::INFO);
$logManager->write("[API] Rest API request body \n" . $json, LogRecordType::INFO);
$logManager->write("[API] Rest API request body -> decodet to json \n" . var_export($obj), LogRecordType::INFO);
//zabespecit proti Ddosu
if (isset($obj['user']) && $obj['user'] != ''){

View File

@ -26,6 +26,7 @@ class Log extends Template
}
$template->prepare('baseDir', BASEDIR);
$template->prepare('debugMod', DEBUGMOD);
$template->prepare('title', 'Logy');
$template->prepare('logsFiles', $result);
$template->prepare('langMng', $langMng);