Add database management back to front-end and begin some refactoring
Here we go again boys...
This commit is contained in:
parent
2b80de03df
commit
97dc0519d6
32 changed files with 774 additions and 407 deletions
|
@ -1,148 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Pterodactyl - Panel
|
||||
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
|
||||
*
|
||||
* This software is licensed under the terms of the MIT license.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
namespace Pterodactyl\Services\Database;
|
||||
|
||||
use Illuminate\Database\DatabaseManager;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Pterodactyl\Extensions\DynamicDatabaseConnection;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface;
|
||||
|
||||
class DatabaseHostService
|
||||
{
|
||||
/**
|
||||
* @var \Illuminate\Database\DatabaseManager
|
||||
*/
|
||||
protected $database;
|
||||
|
||||
/**
|
||||
* @var \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface
|
||||
*/
|
||||
protected $databaseRepository;
|
||||
|
||||
/**
|
||||
* @var \Pterodactyl\Extensions\DynamicDatabaseConnection
|
||||
*/
|
||||
protected $dynamic;
|
||||
|
||||
/**
|
||||
* @var \Illuminate\Contracts\Encryption\Encrypter
|
||||
*/
|
||||
protected $encrypter;
|
||||
|
||||
/**
|
||||
* @var \Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface
|
||||
*/
|
||||
protected $repository;
|
||||
|
||||
/**
|
||||
* DatabaseHostService constructor.
|
||||
*
|
||||
* @param \Illuminate\Database\DatabaseManager $database
|
||||
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $databaseRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface $repository
|
||||
* @param \Pterodactyl\Extensions\DynamicDatabaseConnection $dynamic
|
||||
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
|
||||
*/
|
||||
public function __construct(
|
||||
DatabaseManager $database,
|
||||
DatabaseRepositoryInterface $databaseRepository,
|
||||
DatabaseHostRepositoryInterface $repository,
|
||||
DynamicDatabaseConnection $dynamic,
|
||||
Encrypter $encrypter
|
||||
) {
|
||||
$this->database = $database;
|
||||
$this->databaseRepository = $databaseRepository;
|
||||
$this->dynamic = $dynamic;
|
||||
$this->encrypter = $encrypter;
|
||||
$this->repository = $repository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new database host and persist it to the database.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \Pterodactyl\Models\DatabaseHost
|
||||
*
|
||||
* @throws \Throwable
|
||||
* @throws \PDOException
|
||||
*/
|
||||
public function create(array $data)
|
||||
{
|
||||
$this->database->beginTransaction();
|
||||
|
||||
$host = $this->repository->create([
|
||||
'password' => $this->encrypter->encrypt(array_get($data, 'password')),
|
||||
'name' => array_get($data, 'name'),
|
||||
'host' => array_get($data, 'host'),
|
||||
'port' => array_get($data, 'port'),
|
||||
'username' => array_get($data, 'username'),
|
||||
'max_databases' => null,
|
||||
'node_id' => array_get($data, 'node_id'),
|
||||
]);
|
||||
|
||||
// Check Access
|
||||
$this->dynamic->set('dynamic', $host);
|
||||
$this->database->connection('dynamic')->select('SELECT 1 FROM dual');
|
||||
|
||||
$this->database->commit();
|
||||
|
||||
return $host;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a database host and persist to the database.
|
||||
*
|
||||
* @param int $id
|
||||
* @param array $data
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function update($id, array $data)
|
||||
{
|
||||
$this->database->beginTransaction();
|
||||
|
||||
if (! empty(array_get($data, 'password'))) {
|
||||
$data['password'] = $this->encrypter->encrypt($data['password']);
|
||||
} else {
|
||||
unset($data['password']);
|
||||
}
|
||||
|
||||
$host = $this->repository->update($id, $data);
|
||||
|
||||
$this->dynamic->set('dynamic', $host);
|
||||
$this->database->connection('dynamic')->select('SELECT 1 FROM dual');
|
||||
|
||||
$this->database->commit();
|
||||
|
||||
return $host;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a database host if it has no active databases attached to it.
|
||||
*
|
||||
* @param int $id
|
||||
* @return bool|null
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
$count = $this->databaseRepository->findCountWhere([['database_host_id', '=', $id]]);
|
||||
if ($count > 0) {
|
||||
throw new DisplayException(trans('exceptions.databases.delete_has_databases'));
|
||||
}
|
||||
|
||||
return $this->repository->delete($id);
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
namespace Pterodactyl\Services\Database;
|
||||
namespace Pterodactyl\Services\Databases;
|
||||
|
||||
use Illuminate\Database\DatabaseManager;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
|
@ -79,28 +79,26 @@ class DatabaseManagementService
|
|||
$database = $this->repository->createIfNotExists($data);
|
||||
$this->dynamic->set('dynamic', $data['database_host_id']);
|
||||
|
||||
$this->repository->createDatabase($database->database, 'dynamic');
|
||||
$this->repository->createDatabase($database->database);
|
||||
$this->repository->createUser(
|
||||
$database->username,
|
||||
$database->remote,
|
||||
$this->encrypter->decrypt($database->password),
|
||||
'dynamic'
|
||||
$this->encrypter->decrypt($database->password)
|
||||
);
|
||||
$this->repository->assignUserToDatabase(
|
||||
$database->database,
|
||||
$database->username,
|
||||
$database->remote,
|
||||
'dynamic'
|
||||
$database->remote
|
||||
);
|
||||
$this->repository->flush('dynamic');
|
||||
$this->repository->flush();
|
||||
|
||||
$this->database->commit();
|
||||
} catch (\Exception $ex) {
|
||||
try {
|
||||
if (isset($database)) {
|
||||
$this->repository->dropDatabase($database->database, 'dynamic');
|
||||
$this->repository->dropUser($database->username, $database->remote, 'dynamic');
|
||||
$this->repository->flush('dynamic');
|
||||
$this->repository->dropDatabase($database->database);
|
||||
$this->repository->dropUser($database->username, $database->remote);
|
||||
$this->repository->flush();
|
||||
}
|
||||
} catch (\Exception $exTwo) {
|
||||
// ignore an exception
|
||||
|
@ -113,62 +111,22 @@ class DatabaseManagementService
|
|||
return $database;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the password for a specific user and database combination.
|
||||
*
|
||||
* @param int $id
|
||||
* @param string $password
|
||||
* @return bool
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function changePassword($id, $password)
|
||||
{
|
||||
$database = $this->repository->find($id);
|
||||
$this->dynamic->set('dynamic', $database->database_host_id);
|
||||
|
||||
$this->database->beginTransaction();
|
||||
|
||||
try {
|
||||
$updated = $this->repository->withoutFresh()->update($id, [
|
||||
'password' => $this->encrypter->encrypt($password),
|
||||
]);
|
||||
|
||||
$this->repository->dropUser($database->username, $database->remote, 'dynamic');
|
||||
$this->repository->createUser($database->username, $database->remote, $password, 'dynamic');
|
||||
$this->repository->assignUserToDatabase(
|
||||
$database->database,
|
||||
$database->username,
|
||||
$database->remote,
|
||||
'dynamic'
|
||||
);
|
||||
$this->repository->flush('dynamic');
|
||||
|
||||
$this->database->commit();
|
||||
} catch (\Exception $ex) {
|
||||
$this->database->rollBack();
|
||||
throw $ex;
|
||||
}
|
||||
|
||||
return $updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a database from the given host server.
|
||||
*
|
||||
* @param int $id
|
||||
* @return bool|null
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
$database = $this->repository->find($id);
|
||||
$this->dynamic->set('dynamic', $database->database_host_id);
|
||||
|
||||
$this->repository->dropDatabase($database->database, 'dynamic');
|
||||
$this->repository->dropUser($database->username, $database->remote, 'dynamic');
|
||||
$this->repository->flush('dynamic');
|
||||
$this->repository->dropDatabase($database->database);
|
||||
$this->repository->dropUser($database->username, $database->remote);
|
||||
$this->repository->flush();
|
||||
|
||||
return $this->repository->delete($id);
|
||||
}
|
86
app/Services/Databases/DatabasePasswordService.php
Normal file
86
app/Services/Databases/DatabasePasswordService.php
Normal file
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Services\Databases;
|
||||
|
||||
use Pterodactyl\Models\Database;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Pterodactyl\Extensions\DynamicDatabaseConnection;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
|
||||
|
||||
class DatabasePasswordService
|
||||
{
|
||||
/**
|
||||
* @var \Illuminate\Database\ConnectionInterface
|
||||
*/
|
||||
private $connection;
|
||||
|
||||
/**
|
||||
* @var \Pterodactyl\Extensions\DynamicDatabaseConnection
|
||||
*/
|
||||
private $dynamic;
|
||||
|
||||
/**
|
||||
* @var \Illuminate\Contracts\Encryption\Encrypter
|
||||
*/
|
||||
private $encrypter;
|
||||
|
||||
/**
|
||||
* @var \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface
|
||||
*/
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
* DatabasePasswordService constructor.
|
||||
*
|
||||
* @param \Illuminate\Database\ConnectionInterface $connection
|
||||
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $repository
|
||||
* @param \Pterodactyl\Extensions\DynamicDatabaseConnection $dynamic
|
||||
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
|
||||
*/
|
||||
public function __construct(
|
||||
ConnectionInterface $connection,
|
||||
DatabaseRepositoryInterface $repository,
|
||||
DynamicDatabaseConnection $dynamic,
|
||||
Encrypter $encrypter
|
||||
) {
|
||||
$this->connection = $connection;
|
||||
$this->dynamic = $dynamic;
|
||||
$this->encrypter = $encrypter;
|
||||
$this->repository = $repository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a password for a given database.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Database|int $database
|
||||
* @param string $password
|
||||
* @return bool
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function handle($database, string $password): bool
|
||||
{
|
||||
if (! $database instanceof Database) {
|
||||
$database = $this->repository->find($database);
|
||||
}
|
||||
|
||||
$this->dynamic->set('dynamic', $database->database_host_id);
|
||||
$this->connection->beginTransaction();
|
||||
|
||||
$updated = $this->repository->withoutFresh()->update($database->id, [
|
||||
'password' => $this->encrypter->encrypt($password),
|
||||
]);
|
||||
|
||||
$this->repository->dropUser($database->username, $database->remote);
|
||||
$this->repository->createUser($database->username, $database->remote, $password);
|
||||
$this->repository->assignUserToDatabase($database->database, $database->username, $database->remote);
|
||||
$this->repository->flush();
|
||||
|
||||
unset($password);
|
||||
$this->connection->commit();
|
||||
|
||||
return $updated;
|
||||
}
|
||||
}
|
92
app/Services/Databases/Hosts/HostCreationService.php
Normal file
92
app/Services/Databases/Hosts/HostCreationService.php
Normal file
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Services\Databases\Hosts;
|
||||
|
||||
use Pterodactyl\Models\DatabaseHost;
|
||||
use Illuminate\Database\DatabaseManager;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Pterodactyl\Extensions\DynamicDatabaseConnection;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface;
|
||||
|
||||
class HostCreationService
|
||||
{
|
||||
/**
|
||||
* @var \Illuminate\Database\ConnectionInterface
|
||||
*/
|
||||
private $connection;
|
||||
|
||||
/**
|
||||
* @var \Illuminate\Database\DatabaseManager
|
||||
*/
|
||||
private $databaseManager;
|
||||
|
||||
/**
|
||||
* @var \Pterodactyl\Extensions\DynamicDatabaseConnection
|
||||
*/
|
||||
private $dynamic;
|
||||
|
||||
/**
|
||||
* @var \Illuminate\Contracts\Encryption\Encrypter
|
||||
*/
|
||||
private $encrypter;
|
||||
|
||||
/**
|
||||
* @var \Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface
|
||||
*/
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
* HostCreationService constructor.
|
||||
*
|
||||
* @param \Illuminate\Database\ConnectionInterface $connection
|
||||
* @param \Illuminate\Database\DatabaseManager $databaseManager
|
||||
* @param \Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface $repository
|
||||
* @param \Pterodactyl\Extensions\DynamicDatabaseConnection $dynamic
|
||||
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
|
||||
*/
|
||||
public function __construct(
|
||||
ConnectionInterface $connection,
|
||||
DatabaseManager $databaseManager,
|
||||
DatabaseHostRepositoryInterface $repository,
|
||||
DynamicDatabaseConnection $dynamic,
|
||||
Encrypter $encrypter
|
||||
) {
|
||||
$this->connection = $connection;
|
||||
$this->databaseManager = $databaseManager;
|
||||
$this->dynamic = $dynamic;
|
||||
$this->encrypter = $encrypter;
|
||||
$this->repository = $repository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new database host on the Panel.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \Pterodactyl\Models\DatabaseHost
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function handle(array $data): DatabaseHost
|
||||
{
|
||||
$this->connection->beginTransaction();
|
||||
|
||||
$host = $this->repository->create([
|
||||
'password' => $this->encrypter->encrypt(array_get($data, 'password')),
|
||||
'name' => array_get($data, 'name'),
|
||||
'host' => array_get($data, 'host'),
|
||||
'port' => array_get($data, 'port'),
|
||||
'username' => array_get($data, 'username'),
|
||||
'max_databases' => null,
|
||||
'node_id' => array_get($data, 'node_id'),
|
||||
]);
|
||||
|
||||
// Confirm access using the provided credentials before saving data.
|
||||
$this->dynamic->set('dynamic', $host);
|
||||
$this->databaseManager->connection('dynamic')->select('SELECT 1 FROM dual');
|
||||
$this->connection->commit();
|
||||
|
||||
return $host;
|
||||
}
|
||||
}
|
53
app/Services/Databases/Hosts/HostDeletionService.php
Normal file
53
app/Services/Databases/Hosts/HostDeletionService.php
Normal file
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Services\Databases\Hosts;
|
||||
|
||||
use Pterodactyl\Exceptions\Service\HasActiveServersException;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface;
|
||||
|
||||
class HostDeletionService
|
||||
{
|
||||
/**
|
||||
* @var \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface
|
||||
*/
|
||||
private $databaseRepository;
|
||||
|
||||
/**
|
||||
* @var \Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface
|
||||
*/
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
* HostDeletionService constructor.
|
||||
*
|
||||
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $databaseRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface $repository
|
||||
*/
|
||||
public function __construct(
|
||||
DatabaseRepositoryInterface $databaseRepository,
|
||||
DatabaseHostRepositoryInterface $repository
|
||||
) {
|
||||
$this->databaseRepository = $databaseRepository;
|
||||
$this->repository = $repository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a specified host from the Panel if no databases are
|
||||
* attached to it.
|
||||
*
|
||||
* @param int $host
|
||||
* @return int
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Service\HasActiveServersException
|
||||
*/
|
||||
public function handle(int $host): int
|
||||
{
|
||||
$count = $this->databaseRepository->findCountWhere([['database_host_id', '=', $host]]);
|
||||
if ($count > 0) {
|
||||
throw new HasActiveServersException(trans('exceptions.databases.delete_has_databases'));
|
||||
}
|
||||
|
||||
return $this->repository->delete($host);
|
||||
}
|
||||
}
|
96
app/Services/Databases/Hosts/HostUpdateService.php
Normal file
96
app/Services/Databases/Hosts/HostUpdateService.php
Normal file
|
@ -0,0 +1,96 @@
|
|||
<?php
|
||||
/**
|
||||
* Pterodactyl - Panel
|
||||
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
|
||||
*
|
||||
* This software is licensed under the terms of the MIT license.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
namespace Pterodactyl\Services\Databases\Hosts;
|
||||
|
||||
use Pterodactyl\Models\DatabaseHost;
|
||||
use Illuminate\Database\DatabaseManager;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Pterodactyl\Extensions\DynamicDatabaseConnection;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface;
|
||||
|
||||
class HostUpdateService
|
||||
{
|
||||
/**
|
||||
* @var \Illuminate\Database\ConnectionInterface
|
||||
*/
|
||||
private $connection;
|
||||
|
||||
/**
|
||||
* @var \Illuminate\Database\DatabaseManager
|
||||
*/
|
||||
private $databaseManager;
|
||||
|
||||
/**
|
||||
* @var \Pterodactyl\Extensions\DynamicDatabaseConnection
|
||||
*/
|
||||
private $dynamic;
|
||||
|
||||
/**
|
||||
* @var \Illuminate\Contracts\Encryption\Encrypter
|
||||
*/
|
||||
private $encrypter;
|
||||
|
||||
/**
|
||||
* @var \Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface
|
||||
*/
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
* DatabaseHostService constructor.
|
||||
*
|
||||
* @param \Illuminate\Database\ConnectionInterface $connection
|
||||
* @param \Illuminate\Database\DatabaseManager $databaseManager
|
||||
* @param \Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface $repository
|
||||
* @param \Pterodactyl\Extensions\DynamicDatabaseConnection $dynamic
|
||||
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
|
||||
*/
|
||||
public function __construct(
|
||||
ConnectionInterface $connection,
|
||||
DatabaseManager $databaseManager,
|
||||
DatabaseHostRepositoryInterface $repository,
|
||||
DynamicDatabaseConnection $dynamic,
|
||||
Encrypter $encrypter
|
||||
) {
|
||||
$this->connection = $connection;
|
||||
$this->databaseManager = $databaseManager;
|
||||
$this->dynamic = $dynamic;
|
||||
$this->encrypter = $encrypter;
|
||||
$this->repository = $repository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a database host and persist to the database.
|
||||
*
|
||||
* @param int $hostId
|
||||
* @param array $data
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function handle(int $hostId, array $data): DatabaseHost
|
||||
{
|
||||
if (! empty(array_get($data, 'password'))) {
|
||||
$data['password'] = $this->encrypter->encrypt($data['password']);
|
||||
} else {
|
||||
unset($data['password']);
|
||||
}
|
||||
|
||||
$this->connection->beginTransaction();
|
||||
$host = $this->repository->update($hostId, $data);
|
||||
|
||||
$this->dynamic->set('dynamic', $host);
|
||||
$this->databaseManager->connection('dynamic')->select('SELECT 1 FROM dual');
|
||||
$this->connection->commit();
|
||||
|
||||
return $host;
|
||||
}
|
||||
}
|
|
@ -14,7 +14,7 @@ use Pterodactyl\Models\Server;
|
|||
use GuzzleHttp\Exception\RequestException;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
use Pterodactyl\Services\Database\DatabaseManagementService;
|
||||
use Pterodactyl\Services\Databases\DatabaseManagementService;
|
||||
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface as DaemonServerRepositoryInterface;
|
||||
|
@ -32,7 +32,7 @@ class ServerDeletionService
|
|||
protected $daemonServerRepository;
|
||||
|
||||
/**
|
||||
* @var \Pterodactyl\Services\Database\DatabaseManagementService
|
||||
* @var \Pterodactyl\Services\Databases\DatabaseManagementService
|
||||
*/
|
||||
protected $databaseManagementService;
|
||||
|
||||
|
@ -62,7 +62,7 @@ class ServerDeletionService
|
|||
* @param \Illuminate\Database\ConnectionInterface $connection
|
||||
* @param \Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface $daemonServerRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $databaseRepository
|
||||
* @param \Pterodactyl\Services\Database\DatabaseManagementService $databaseManagementService
|
||||
* @param \Pterodactyl\Services\Databases\DatabaseManagementService $databaseManagementService
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
* @param \Illuminate\Log\Writer $writer
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue