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 11:30:36 +01:00
committed by GitHub
parent 84d38edac2
commit 61ac42143b

View File

@@ -731,6 +731,7 @@ class API extends CI_Controller {
$obj = json_decode(file_get_contents("php://input"), true);
if ($obj === NULL) {
echo json_encode(['status' => 'failed', 'reason' => "wrong JSON"]);
die();
}
if(!isset($obj['key']) || $this->api_model->authorize($obj['key']) == 0) {
http_response_code(401);