2021-01-05 21:52:49 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Application\Databases;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\DatabaseHost;
|
|
|
|
|
|
|
|
class UpdateDatabaseRequest extends StoreDatabaseRequest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* ?
|
|
|
|
*
|
|
|
|
* @param array|null $rules
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function rules(array $rules = null): array
|
|
|
|
{
|
2021-01-09 16:38:50 +00:00
|
|
|
return $rules ?? DatabaseHost::getRulesForUpdate($this->route()->parameter('databaseHost')->id);
|
2021-01-05 21:52:49 +00:00
|
|
|
}
|
|
|
|
}
|