Enhance API error handling and response structure; update app name retrieval method
This commit is contained in:
1 parent
95f8e22f11
commit
eb67458ab1
9 files changed
+38
-9
No files matched your search
+2
-1
@@ -16,7 +16,8 @@ if (!isset($input["name"]) || !isset($input["text"])) {
|
||||
$api->answer(400, [
|
||||
"error" => "missing_fields",
|
||||
"error_text" => "Some fields are missing"
|
||||
]);
|
||||
], true);
|
||||
return;
|
||||
}
|
||||
|
||||
$html_allowed = $api->getSetting("allow_html");
|
||||
|
||||
@@ -21,6 +21,7 @@ if (!$result) {
|
||||
"entrys" => [],
|
||||
"empty" => true
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
foreach($result as $row) {
|
||||
|
||||
Reference in new issue
Block a user