API enhancements, return node config, return 200 not 201

This commit is contained in:
Dane Everitt 2016-10-12 15:42:23 -04:00
parent ab19e2ee96
commit 84a4c8b7f4
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 74 additions and 14 deletions

View file

@ -129,9 +129,7 @@ class UserController extends BaseController
try {
$user = new UserRepository;
$create = $user->create($request->input('email'), $request->input('password'), $request->input('admin'), $request->input('custom_id'));
return $this->response->created(route('api.users.view', [
'id' => $create
]));
return [ 'id' => $create ];
} catch (DisplayValidationException $ex) {
throw new ResourceException('A validation error occured.', json_decode($ex->getMessage(), true));
} catch (DisplayException $ex) {