misc_pterodactyl-panel/app/Http/Requests/Api/Application/Servers/UpdateServerStartupRequest.php

23 lines
619 B
PHP
Raw Normal View History

2018-01-31 02:36:59 +00:00
<?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);
2018-01-31 02:36:59 +00:00
return [
'startup' => $rules['startup'],
2018-01-31 02:36:59 +00:00
'environment' => 'present|array',
'egg_id' => $rules['egg_id'],
'image' => $rules['image'],
2018-01-31 02:36:59 +00:00
'skip_scripts' => 'present|boolean',
];
}
}