22 lines
619 B
PHP
22 lines
619 B
PHP
<?php
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Application\Servers;
|
|
|
|
use Pterodactyl\Models\Server;
|
|
use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
|
|
|
|
class UpdateServerStartupRequest extends ApplicationApiRequest
|
|
{
|
|
public function rules(): array
|
|
{
|
|
$rules = Server::getRulesForUpdate($this->route()->parameter('server')->id);
|
|
|
|
return [
|
|
'startup' => $rules['startup'],
|
|
'environment' => 'present|array',
|
|
'egg_id' => $rules['egg_id'],
|
|
'image' => $rules['image'],
|
|
'skip_scripts' => 'present|boolean',
|
|
];
|
|
}
|
|
}
|