api(application): v2 backport
This commit is contained in:
parent
4cd0bee231
commit
67bf3e342e
172 changed files with 2922 additions and 1579 deletions
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Http\Requests\Api\Application\Eggs\Variables;
|
||||
|
||||
use Pterodactyl\Models\EggVariable;
|
||||
use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
|
||||
|
||||
class UpdateEggVariablesRequest extends ApplicationApiRequest
|
||||
{
|
||||
public function rules(array $rules = null): array
|
||||
{
|
||||
return [
|
||||
'*' => 'array',
|
||||
'*.id' => 'required|integer',
|
||||
'*.name' => 'sometimes|string|min:1|max:191',
|
||||
'*.description' => 'sometimes|string|nullable',
|
||||
'*.env_variable' => 'sometimes|regex:/^[\w]{1,191}$/|notIn:' . EggVariable::RESERVED_ENV_NAMES,
|
||||
'*.default_value' => 'sometimes|present',
|
||||
'*.user_viewable' => 'sometimes|boolean',
|
||||
'*.user_editable' => 'sometimes|boolean',
|
||||
'*.rules' => 'sometimes|string',
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue