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,19 +7,19 @@
*/
// Check if the insert query was successful
if(isset($insert_id) && is_numeric($insert_id)){
// Insert successful
$return_arr['success'] = "True";
$return_arr['count'] = '1';
$return_arr['data'][] = [
'insert_id' => $insert_id
];
if (isset($insert_id) && is_numeric($insert_id)) {
// Insert successful
$return_arr['success'] = "True";
$return_arr['count'] = '1';
$return_arr['data'][] = [
'insert_id' => $insert_id
];
}
// 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 insert query failed, ensure ALL required variables are provided (and aren't duplicates where applicable) and database schema is up-to-date. Turn on error logging and look for 'undefined index'.";
else {
$return_arr['success'] = "False";
$return_arr['message'] = "Auth success but insert query failed, ensure ALL required variables are provided (and aren't duplicates where applicable) and database schema is up-to-date. Turn on error logging and look for 'undefined index'.";
}
echo json_encode($return_arr);