Skip to content

Commit db29b04

Browse files
committed
Fix improper allocation id validation on API
1 parent a9c1946 commit db29b04

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
77
### Fixed
88
* `[rc.2]` — Fixes bad API behavior on `/user` routes.
99
* `[rc.2]` — Fixes Admin CP user editing resetting a password on users unintentionally.
10+
* `[rc.2]` — Fixes bug with server creation API endpoint that would fail to validate `allocation.default` correctly.
1011

1112
### Added
1213
* Added ability to search the following API endpoints: list users, list servers, and list locations.

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ public function withValidator(Validator $validator)
101101
$validator->sometimes('allocation.default', [
102102
'required', 'integer', 'bail',
103103
Rule::exists('allocations', 'id')->where(function ($query) {
104-
$query->where('node_id', $this->input('node_id'));
105104
$query->whereNull('server_id');
106105
}),
107106
], function ($input) {
@@ -111,7 +110,6 @@ public function withValidator(Validator $validator)
111110
$validator->sometimes('allocation.additional.*', [
112111
'integer',
113112
Rule::exists('allocations', 'id')->where(function ($query) {
114-
$query->where('node_id', $this->input('node_id'));
115113
$query->whereNull('server_id');
116114
}),
117115
], function ($input) {

0 commit comments

Comments
 (0)