Fix improper allocation id validation on API
This commit is contained in:
parent
a9c1946319
commit
db29b04c39
2 changed files with 1 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue