rollback commit fc6b196 [Added the possibility of sending data to the "qso" method API also in…]

这个提交包含在:
Emiliano Macedonio 2024-06-07 13:29:01 +02:00
父节点 361b188465
当前提交 a0caceff9f

查看文件

@ -193,13 +193,8 @@ class API extends CI_Controller {
// Decode JSON and store
$obj = json_decode(file_get_contents("php://input"), true);
if ($obj === NULL) {
// Decoding not valid try simple www-x-form-urlencoded
$objTmp = file_get_contents("php://input");
parse_str($objTmp, $obj);
if ($obj === NULL) {
echo json_encode(['status' => 'failed', 'reason' => "wrong JSON"]);
die();
}
echo json_encode(['status' => 'failed', 'reason' => "wrong JSON"]);
die();
}
if(!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {