From 7674ee0e2b91aa6c7037264a64860aee03ee2621 Mon Sep 17 00:00:00 2001 From: Exotical Date: Thu, 30 May 2024 00:54:07 +0200 Subject: [PATCH] Make deploy.locations optional in the api (#295) --- .../Requests/Api/Application/Servers/StoreServerRequest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php b/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php index fd735edf0..263b7c540 100644 --- a/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php +++ b/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php @@ -56,11 +56,10 @@ class StoreServerRequest extends ApplicationApiRequest // Automatic deployment rules 'deploy' => 'sometimes|required|array', 'deploy.locations' => 'array', - 'deploy.locations.*' => 'integer|min:1', + 'deploy.locations.*' => 'required_with:deploy.locations,integer|min:1', 'deploy.dedicated_ip' => 'required_with:deploy,boolean', 'deploy.port_range' => 'array', 'deploy.port_range.*' => 'string', - 'start_on_completion' => 'sometimes|boolean', ]; }