From 2198269a65456079e0ef54b919b2efba1c0a75ed Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 3 Aug 2019 13:03:54 -0700 Subject: [PATCH] Fix allocations requiring an alias when generated via API. --- CHANGELOG.md | 1 + .../Api/Application/Allocations/StoreAllocationRequest.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a880196b8..252268149 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ value when showing an error state. error encountered during creation or update. * Two-factor tokens generated when a company name has a space in it will now properly be parsed on iOS authenticator devices. * Fixed 500 error when trying to request subuser's from a server in the application API. +* Creating a node allocation via the API no longer requires an alias field be passed through in the request. ### Added * Server listing view now displays the total used disk space for each server. diff --git a/app/Http/Requests/Api/Application/Allocations/StoreAllocationRequest.php b/app/Http/Requests/Api/Application/Allocations/StoreAllocationRequest.php index 2cf2ae004..f795a114e 100644 --- a/app/Http/Requests/Api/Application/Allocations/StoreAllocationRequest.php +++ b/app/Http/Requests/Api/Application/Allocations/StoreAllocationRequest.php @@ -40,7 +40,7 @@ class StoreAllocationRequest extends ApplicationApiRequest return [ 'allocation_ip' => $data['ip'], 'allocation_ports' => $data['ports'], - 'allocation_alias' => $data['alias'], + 'allocation_alias' => $data['alias'] ?? null, ]; } }