Prevent empty Call on editing or logging via API
这个提交包含在:
父节点
b418a2cdc4
当前提交
a2d9da8a3e
共有 2 个文件被更改,包括 190 次插入 和 180 次删除
|
|
@ -214,6 +214,12 @@ class API extends CI_Controller {
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!(isset($record['call'])) || (trim($record['call']) == '')) {
|
||||||
|
http_response_code(401);
|
||||||
|
echo json_encode(['status' => 'failed', 'reason' => "QSO Call is empty."]);
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
$this->api_model->update_last_used($obj['key']);
|
$this->api_model->update_last_used($obj['key']);
|
||||||
|
|
||||||
$msg = $this->logbook_model->import($record, $obj['station_profile_id'], NULL, NULL, NULL, NULL, NULL, NULL, false, false, true);
|
$msg = $this->logbook_model->import($record, $obj['station_profile_id'], NULL, NULL, NULL, NULL, NULL, NULL, false, false, true);
|
||||||
|
|
|
||||||
|
|
@ -1028,6 +1028,10 @@ class Logbook_model extends CI_Model {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (trim($this->input->post('callsign')) == '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$station_profile=$CI->stations->profile_clean($stationId);
|
$station_profile=$CI->stations->profile_clean($stationId);
|
||||||
$stationCallsign=$station_profile->station_callsign;
|
$stationCallsign=$station_profile->station_callsign;
|
||||||
|
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用