From 0a39a9b6bfefc0fc9b6a2b189bcdd7689e4b7991 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Thu, 1 Mar 2018 18:35:53 -0600 Subject: [PATCH] Don't require an environment variable to be present if none are required anyways, closes #1007 --- CHANGELOG.md | 1 + .../Requests/Api/Application/Servers/StoreServerRequest.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 054bfb0c6..eee443604 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. ### Fixed * Fixes a bug when reinstalling a server that would not mark the server as installing, resulting in some UI issues. * Handle 404 errors from missing models in the application API bindings correctly. +* Fix validation error returned when no environment variables are passed, even if there are no variables required. ### Added * Adds back client API for sending commands or power toggles to a server though the Panel API: `/api/client/servers/` diff --git a/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php b/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php index 6d0d2ecf3..d12b738e6 100644 --- a/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php +++ b/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php @@ -39,7 +39,7 @@ class StoreServerRequest extends ApplicationApiRequest 'pack' => $rules['pack_id'], 'docker_image' => $rules['image'], 'startup' => $rules['startup'], - 'environment' => 'required|array', + 'environment' => 'present|array', 'skip_scripts' => 'sometimes|boolean', // Resource limitations