mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 14:53:45 +02:00
Rely on the test connection to the MySQL instance rather than trying to validate the host manually; closes #2311; closes #2282
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Pterodactyl\Rules\ResolvesToIPAddress;
|
||||
|
||||
class DatabaseHost extends Model
|
||||
{
|
||||
/**
|
||||
@@ -60,18 +58,6 @@ class DatabaseHost extends Model
|
||||
'node_id' => 'sometimes|nullable|integer|exists:nodes,id',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function getRules()
|
||||
{
|
||||
$rules = parent::getRules();
|
||||
|
||||
$rules['host'] = array_merge($rules['host'], [ new ResolvesToIPAddress() ]);
|
||||
|
||||
return $rules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the node associated with a database host.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user