Enhance API error handling and response structure; update app name retrieval method

This commit is contained in:
marc-go committed 2026-10-10 19:23:11 +02:00
1 parent 95f8e22f11
commit eb67458ab1
9 files changed
+38 -9

No files matched your search

+2 -3
View File
@@ -11,9 +11,8 @@ require_once API_DIR . "api.php";
$api = new gbAPI(false, $internal);
// Get App Name
$command = "SELECT name, value FROM settings WHERE name = :name";
$result = $api->dbCommand($command, true, true, [":name" => "application_name"]);
$result = $api->getSetting("application_name");
$api->answer(200, [
"application_name" => $result[0]["value"]
"application_name" => $result
]);