API code style tidy

This commit is contained in:
Marcus Hill
2023-01-01 16:00:07 +00:00
parent 6746edda1a
commit ff741c223e
22 changed files with 461 additions and 461 deletions

View File

@@ -7,16 +7,16 @@
*/
// Check if the insert query was successful
if(isset($update_count) && is_numeric($update_count) && $update_count > 0){
// Insert successful
$return_arr['success'] = "True";
$return_arr['count'] = $update_count;
if (isset($update_count) && is_numeric($update_count) && $update_count > 0) {
// Insert successful
$return_arr['success'] = "True";
$return_arr['count'] = $update_count;
}
// Query returned false: something went wrong, or it was declined due to required variables missing
else{
$return_arr['success'] = "False";
$return_arr['message'] = "Auth success but update query failed/returned no results. Ensure ALL required variables are provided and database schema is up-to-date. Most likely cause: non-existent module ID (contact ID/ticket ID/etc)";
else {
$return_arr['success'] = "False";
$return_arr['message'] = "Auth success but update query failed/returned no results. Ensure ALL required variables are provided and database schema is up-to-date. Most likely cause: non-existent module ID (contact ID/ticket ID/etc)";
}
echo json_encode($return_arr);