misc_pterodactyl-panel/app/Http/Requests/Api/Application/Servers/UpdateServerStartupRequest.php
2022-12-14 17:05:46 -07:00

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',
];
}
}