mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Update application/controllers/Api.php
Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com>
This commit is contained in:
@@ -733,6 +733,10 @@ class API extends CI_Controller {
|
||||
echo json_encode(['status' => 'failed', 'reason' => "wrong JSON"]);
|
||||
die();
|
||||
}
|
||||
// Check rate limit
|
||||
$identifier = isset($obj['key']) ? $obj['key'] : null;
|
||||
$this->check_rate_limit('logbook_get_worked_grids', $identifier);
|
||||
|
||||
if(!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {
|
||||
http_response_code(401);
|
||||
echo json_encode(['status' => 'failed', 'reason' => "missing api key"]);
|
||||
|
||||
Reference in New Issue
Block a user