mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 02:14:13 +00:00
Merge pull request #12 from int2001/api_radio_not_empty
Throw detailled Error at CAT-API, if radio-value isn't set
This commit is contained in:
@@ -425,6 +425,12 @@ class API extends CI_Controller {
|
||||
die();
|
||||
}
|
||||
|
||||
if(!isset($obj['radio'])) {
|
||||
http_response_code(404);
|
||||
echo json_encode(['status' => 'failed', 'reason' => "missing radio element in payload"]);
|
||||
die();
|
||||
}
|
||||
|
||||
$this->api_model->update_last_used($obj['key']);
|
||||
|
||||
$user_id = $this->api_model->key_userid($obj['key']);
|
||||
|
||||
Reference in New Issue
Block a user