From c7a1a5b383a5e58975aef54ca257396a18d8059f Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 8 Feb 2017 20:57:26 +0200 Subject: [PATCH] test --- app/library/App/Controllers/UserController.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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