diff --git a/controllers/companies.php b/controllers/companies.php index cda03f4..4253caf 100644 --- a/controllers/companies.php +++ b/controllers/companies.php @@ -19,7 +19,7 @@ if($_REQUEST['action'] === 'index'){ $requestBody = file_get_contents('php://input'); $body = json_decode($requestBody); $updatedCompany = new Company(null, $body->name); - $allCompanies = People::update($_REQUEST['id'], $updatedCompany); + $allCompanies = Companies::update($_REQUEST['id'], $updatedCompany); echo json_encode($allCompanies); }