Update file permissions and enhance error handling in API responses

This commit is contained in:
admin committed 2026-10-10 21:26:38 +02:00
1 parent eb67458ab1
commit ce0777bb33
8 files changed
+28 -6

No files matched your search

+10 -4
View File
@@ -12,7 +12,13 @@ $api = new gbAPI(false, $internal);
// Get App Name
$result = $api->getSetting("application_name");
$api->answer(200, [
"application_name" => $result
]);
if ($result !== NULL) {
$api->answer(200, [
"application_name" => $result
]);
}else{
$api->answer(500, [
"error" => "empty_query",
"error_text" => "Database query returned nothing."
]);
}