misc_pterodactyl-panel/app/Http/Requests/Api/Application/Servers/UpdateServerStartupRequest.php
2021-09-16 15:03:51 -06: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',
];
}
}