diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/clients-edit.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/include/clients-edit.php b/include/clients-edit.php index 00961aa..ded72d2 100644 --- a/include/clients-edit.php +++ b/include/clients-edit.php @@ -24,13 +24,8 @@ $response = new Response(); try { $client = new Client($_pdo, $_REQUEST['pk']); - if ($client->setName($_REQUEST['value'])) { - $response->success = true; - } else { - $response->http_response_code(500); - $response->success = false; - $response->message = "The client could not be edited due to an error."; - } + $client->name = $_REQUEST['value']; + $response->success = true; } catch (PDOException $e) { $response->http_response_code(500); $response->success = false; |