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
|
|
|
|
{
|
2021-09-16 20:59:22 +00:00
|
|
|
$rules = Server::getRulesForUpdate($this->route()->parameter('server')->id);
|
2018-01-31 02:36:59 +00:00
|
|
|
|
|
|
|
return [
|
2021-09-16 20:59:22 +00:00
|
|
|
'startup' => $rules['startup'],
|
2018-01-31 02:36:59 +00:00
|
|
|
'environment' => 'present|array',
|
2021-09-16 20:59:22 +00:00
|
|
|
'egg_id' => $rules['egg_id'],
|
|
|
|
'image' => $rules['image'],
|
2018-01-31 02:36:59 +00:00
|
|
|
'skip_scripts' => 'present|boolean',
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|