Added the possibility of sending data to the "qso" method API also in www-x-form-urlencoded format to allow the automatic sending of QSOs via software such as Log4OM
这个提交包含在:
父节点
d41e524dbd
当前提交
fc6b1966e3
共有 1 个文件被更改,包括 7 次插入 和 2 次删除
|
|
@ -193,8 +193,13 @@ class API extends CI_Controller {
|
||||||
// Decode JSON and store
|
// Decode JSON and store
|
||||||
$obj = json_decode(file_get_contents("php://input"), true);
|
$obj = json_decode(file_get_contents("php://input"), true);
|
||||||
if ($obj === NULL) {
|
if ($obj === NULL) {
|
||||||
echo json_encode(['status' => 'failed', 'reason' => "wrong JSON"]);
|
// Decoding not valid try simple www-x-form-urlencoded
|
||||||
die();
|
$objTmp = file_get_contents("php://input");
|
||||||
|
parse_str($objTmp, $obj);
|
||||||
|
if ($obj === NULL) {
|
||||||
|
echo json_encode(['status' => 'failed', 'reason' => "wrong JSON"]);
|
||||||
|
die();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {
|
if(!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用