Update application/controllers/Api.php

Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com>
This commit is contained in:
Florian (DF2ET)
2026-02-20 12:23:55 +01:00
committed by GitHub
parent fe95d2d7ed
commit 1a85fea561

View File

@@ -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"]);