Fix server description nullablility
This commit is contained in:
parent
a75b15cd8d
commit
adcab5969a
3 changed files with 6 additions and 2 deletions
|
@ -254,6 +254,7 @@ class ServersController extends Controller
|
|||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
*/
|
||||
public function store(ServerFormRequest $request)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,10 @@ class ServerFormRequest extends AdminFormRequest
|
|||
*/
|
||||
public function rules()
|
||||
{
|
||||
return Server::getCreateRules();
|
||||
$rules = Server::getCreateRules();
|
||||
$rules['description'][] = 'nullable';
|
||||
|
||||
return $rules;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -118,7 +118,7 @@ class ServerCreationService
|
|||
'uuidShort' => str_random(8),
|
||||
'node_id' => array_get($data, 'node_id'),
|
||||
'name' => array_get($data, 'name'),
|
||||
'description' => array_get($data, 'description', ''),
|
||||
'description' => array_get($data, 'description') ?? '',
|
||||
'skip_scripts' => isset($data['skip_scripts']),
|
||||
'suspended' => false,
|
||||
'owner_id' => array_get($data, 'owner_id'),
|
||||
|
|
Loading…
Reference in a new issue