95e15d2c8a
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
25 lines
564 B
PHP
25 lines
564 B
PHP
<?php
|
|
|
|
namespace Pterodactyl\Http\Requests\Admin\Node;
|
|
|
|
use Pterodactyl\Rules\Fqdn;
|
|
use Pterodactyl\Models\Node;
|
|
use Pterodactyl\Http\Requests\Admin\AdminFormRequest;
|
|
|
|
class NodeFormRequest extends AdminFormRequest
|
|
{
|
|
/**
|
|
* Get rules to apply to data in this request.
|
|
*/
|
|
public function rules()
|
|
{
|
|
if ($this->method() === 'PATCH') {
|
|
return Node::getRulesForUpdate($this->route()->parameter('node'));
|
|
}
|
|
|
|
$data = Node::getRules();
|
|
$data['fqdn'][] = Fqdn::make('scheme');
|
|
|
|
return $data;
|
|
}
|
|
}
|