diff --git a/api/v1/assets/delete.php b/api/v1/assets/delete.php new file mode 100644 index 00000000..2ad4fc51 --- /dev/null +++ b/api/v1/assets/delete.php @@ -0,0 +1,28 @@ + 0){ + // Insert successful + $return_arr['success'] = "True"; + $return_arr['count'] = $delete_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 delete query failed. Ensure ALL required variables are provided and database schema is up-to-date. Most likely cause: asset/client/company ID mismatch."; +} + +echo json_encode($return_arr); +exit(); \ No newline at end of file diff --git a/api/v1/require_post_method.php b/api/v1/require_post_method.php index cb13d64b..45686e3a 100644 --- a/api/v1/require_post_method.php +++ b/api/v1/require_post_method.php @@ -10,6 +10,5 @@ if($_SERVER['REQUEST_METHOD'] !== "POST"){ // Client ID must be specific for INSERT/UPDATE/DELETE queries // If this API key allows any client, set $client_id to the one specified, else leave it if($client_id == 0){ - // $client_id = intval($_POST['client_id']); } \ No newline at end of file