Add ability to modify external id for a server
This commit is contained in:
parent
6a4b5e04e2
commit
8daf97021a
|
@ -7,6 +7,9 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
|
|||
### Fixed
|
||||
* Fixes server creation API endpoint not passing the provided `external_id` to the creation service.
|
||||
|
||||
### Added
|
||||
* Adds ability to modify the external ID for a server through the API.
|
||||
|
||||
## v0.7.2 (Derelict Dermodactylus)
|
||||
### Fixed
|
||||
* Fixes an exception thrown when trying to access the `/nests/:id/eggs/:id` API endpoint.
|
||||
|
|
|
@ -13,9 +13,10 @@ class UpdateServerDetailsRequest extends ServerWriteRequest
|
|||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
$rules = Server::getUpdateRulesForId($this->route()->parameter('server')->id);
|
||||
$rules = Server::getUpdateRulesForId($this->getModel(Server::class)->id);
|
||||
|
||||
return [
|
||||
'external_id' => $rules['external_id'],
|
||||
'name' => $rules['name'],
|
||||
'user' => $rules['owner_id'],
|
||||
'description' => array_merge(['nullable'], $rules['description']),
|
||||
|
@ -31,6 +32,7 @@ class UpdateServerDetailsRequest extends ServerWriteRequest
|
|||
public function validated(): array
|
||||
{
|
||||
return [
|
||||
'external_id' => $this->input('external_id'),
|
||||
'name' => $this->input('name'),
|
||||
'owner_id' => $this->input('user'),
|
||||
'description' => $this->input('description'),
|
||||
|
|
Loading…
Reference in New Issue