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