diff --git a/app/library/App/Controllers/UserController.php b/app/library/App/Controllers/UserController.php index b461ea5..ca0d94d 100755 --- a/app/library/App/Controllers/UserController.php +++ b/app/library/App/Controllers/UserController.php @@ -82,13 +82,12 @@ class UserController extends CrudResourceController return $this->onCreateFailed($newItem, $data); } - $newItem->save(); $last_id = $newItem->getWriteConnection()->lastInsertId(); - return var_dump($last_id); //$primaryKey = $this->getModelPrimaryKey(); + $responseData = $this->getFindData($last_id); $response = $this->getCreateResponse($responseData, $data); @@ -98,11 +97,6 @@ class UserController extends CrudResourceController return $response; -// $user = new User(); -// $user->name = $data['name']; -// $user->pass = $data['pass']; -// $user->save(); - } protected function transformPostDataValue($key, $value, $data) -- libgit2 0.21.4