Skip to content

Commit 8daf970

Browse files
committed
Add ability to modify external id for a server
1 parent 6a4b5e0 commit 8daf970

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
77
### Fixed
88
* Fixes server creation API endpoint not passing the provided `external_id` to the creation service.
99

10+
### Added
11+
* Adds ability to modify the external ID for a server through the API.
12+
1013
## v0.7.2 (Derelict Dermodactylus)
1114
### Fixed
1215
* Fixes an exception thrown when trying to access the `/nests/:id/eggs/:id` API endpoint.

app/Http/Requests/Api/Application/Servers/UpdateServerDetailsRequest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ class UpdateServerDetailsRequest extends ServerWriteRequest
1313
*/
1414
public function rules(): array
1515
{
16-
$rules = Server::getUpdateRulesForId($this->route()->parameter('server')->id);
16+
$rules = Server::getUpdateRulesForId($this->getModel(Server::class)->id);
1717

1818
return [
19+
'external_id' => $rules['external_id'],
1920
'name' => $rules['name'],
2021
'user' => $rules['owner_id'],
2122
'description' => array_merge(['nullable'], $rules['description']),
@@ -31,6 +32,7 @@ public function rules(): array
3132
public function validated(): array
3233
{
3334
return [
35+
'external_id' => $this->input('external_id'),
3436
'name' => $this->input('name'),
3537
'owner_id' => $this->input('user'),
3638
'description' => $this->input('description'),

0 commit comments

Comments
 (0)