mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-22 17:52:16 +00:00
Prevent empty Call on editing or logging via API
This commit is contained in:
parent
b418a2cdc4
commit
a2d9da8a3e
@ -214,6 +214,12 @@ class API extends CI_Controller {
|
||||
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']);
|
||||
|
||||
$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;
|
||||
}
|
||||
|
||||
if (trim($this->input->post('callsign')) == '') {
|
||||
return;
|
||||
}
|
||||
|
||||
$station_profile=$CI->stations->profile_clean($stationId);
|
||||
$stationCallsign=$station_profile->station_callsign;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user