Fix other function calls as well

This commit is contained in:
phl0
2026-03-15 09:14:26 +01:00
parent 6f5864dcb1
commit 5c94cf419b

View File

@@ -598,7 +598,7 @@ class API extends CI_Controller {
// Get associated station locations for mysql queries
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id);
if (!$logbooks_locations_array) {
if ($logbooks_locations_array[0] == -1) {
// Logbook not found
http_response_code(404);
echo json_encode(['status' => 'failed', 'reason' => "Empty Logbook"]);
@@ -684,7 +684,7 @@ class API extends CI_Controller {
// Get associated station locations for mysql queries
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($logbook_id);
if (!$logbooks_locations_array) {
if ($logbooks_locations_array[0] == -1) {
// Logbook not found
http_response_code(404);
echo json_encode(['status' => 'failed', 'reason' => "Empty Logbook"]);