diff --git a/CHANGELOG.md b/CHANGELOG.md index a43948eb8..900c06e13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. ### Fixed * `[rc.2]` — Fixes bad API behavior on `/user` routes. * `[rc.2]` — Fixes Admin CP user editing resetting a password on users unintentionally. +* `[rc.2]` — Fixes bug with server creation API endpoint that would fail to validate `allocation.default` correctly. ### Added * Added ability to search the following API endpoints: list users, list servers, and list locations. diff --git a/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php b/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php index 2c95ab52b..6b4473ab3 100644 --- a/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php +++ b/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php @@ -101,7 +101,6 @@ class StoreServerRequest extends ApplicationApiRequest $validator->sometimes('allocation.default', [ 'required', 'integer', 'bail', Rule::exists('allocations', 'id')->where(function ($query) { - $query->where('node_id', $this->input('node_id')); $query->whereNull('server_id'); }), ], function ($input) { @@ -111,7 +110,6 @@ class StoreServerRequest extends ApplicationApiRequest $validator->sometimes('allocation.additional.*', [ 'integer', Rule::exists('allocations', 'id')->where(function ($query) { - $query->where('node_id', $this->input('node_id')); $query->whereNull('server_id'); }), ], function ($input) {