Allow passing empty values through for variables, covers with test, closes #2433

This commit is contained in:
Dane Everitt 2020-10-10 16:45:24 -07:00
parent bf6e1ce966
commit d8228f2da8
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 232 additions and 2 deletions

View file

@ -100,7 +100,7 @@ class StartupController extends ClientApiController
'server_id' => $server->id,
'variable_id' => $variable->id,
], [
'variable_value' => $request->input('value'),
'variable_value' => $request->input('value') ?? '',
]);
$variable = $variable->refresh();

View file

@ -24,7 +24,7 @@ class UpdateStartupVariableRequest extends ClientApiRequest
{
return [
'key' => 'required|string',
'value' => 'present|string',
'value' => 'present',
];
}
}