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

@ -77,9 +77,7 @@ class ServerController extends BaseController
try {
$server = new ServerRepository;
$new = $server->create($request->all());
return $this->response->created(route('api.servers.view', [
'id' => $new
]));
return [ 'id' => $new ];
} catch (DisplayValidationException $ex) {
throw new ResourceException('A validation error occured.', json_decode($ex->getMessage(), true));
} catch (DisplayException $ex) {