Merge branch 'develop' into feature/react-admin
This commit is contained in:
commit
8feb87de7c
532 changed files with 4262 additions and 5622 deletions
|
@ -35,17 +35,12 @@ class DatabaseController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* DatabaseController constructor.
|
||||
*
|
||||
* @param \Pterodactyl\Services\Databases\DatabaseManagementService $databaseManagementService
|
||||
* @param \Pterodactyl\Services\Databases\DatabasePasswordService $databasePasswordService
|
||||
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $repository
|
||||
*/
|
||||
public function __construct(
|
||||
DatabaseManagementService $databaseManagementService,
|
||||
DatabasePasswordService $databasePasswordService,
|
||||
DatabaseRepositoryInterface $repository
|
||||
)
|
||||
{
|
||||
) {
|
||||
parent::__construct();
|
||||
|
||||
$this->databaseManagementService = $databaseManagementService;
|
||||
|
@ -56,12 +51,6 @@ class DatabaseController extends ApplicationApiController
|
|||
/**
|
||||
* Return a listing of all databases currently available to a single
|
||||
* server.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\Databases\GetServerDatabasesRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
*
|
||||
* @return array
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||
*/
|
||||
public function index(GetServerDatabasesRequest $request, Server $server): array
|
||||
{
|
||||
|
@ -72,13 +61,6 @@ class DatabaseController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* Return a single server database.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\Databases\GetServerDatabaseRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param \Pterodactyl\Models\Database $database
|
||||
*
|
||||
* @return array
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||
*/
|
||||
public function view(GetServerDatabaseRequest $request, Server $server, Database $database): array
|
||||
{
|
||||
|
@ -90,12 +72,6 @@ class DatabaseController extends ApplicationApiController
|
|||
/**
|
||||
* Reset the password for a specific server database.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\Databases\ServerDatabaseWriteRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param \Pterodactyl\Models\Database $database
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function resetPassword(ServerDatabaseWriteRequest $request, Server $server, Database $database): JsonResponse
|
||||
|
@ -108,11 +84,6 @@ class DatabaseController extends ApplicationApiController
|
|||
/**
|
||||
* Create a new database on the Panel for a given server.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\Databases\StoreServerDatabaseRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function store(StoreServerDatabaseRequest $request, Server $server): JsonResponse
|
||||
|
@ -135,12 +106,7 @@ class DatabaseController extends ApplicationApiController
|
|||
/**
|
||||
* Handle a request to delete a specific server database from the Panel.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\Databases\ServerDatabaseWriteRequest $request
|
||||
* @param \Pterodactyl\Models\Database $database
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function delete(ServerDatabaseWriteRequest $request, Database $database): JsonResponse
|
||||
{
|
||||
|
|
|
@ -10,11 +10,6 @@ class ExternalServerController extends ApplicationApiController
|
|||
{
|
||||
/**
|
||||
* Retrieve a specific server from the database using its external ID.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\GetExternalServerRequest $request
|
||||
*
|
||||
* @return array
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||
*/
|
||||
public function index(GetExternalServerRequest $request): array
|
||||
{
|
||||
|
|
|
@ -30,9 +30,6 @@ class ServerController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* ServerController constructor.
|
||||
*
|
||||
* @param \Pterodactyl\Services\Servers\ServerCreationService $creationService
|
||||
* @param \Pterodactyl\Services\Servers\ServerDeletionService $deletionService
|
||||
*/
|
||||
public function __construct(
|
||||
ServerCreationService $creationService,
|
||||
|
@ -46,11 +43,6 @@ class ServerController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* Return all of the servers that currently exist on the Panel.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\GetServersRequest $request
|
||||
*
|
||||
* @return array
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||
*/
|
||||
public function index(GetServersRequest $request): array
|
||||
{
|
||||
|
@ -74,10 +66,6 @@ class ServerController extends ApplicationApiController
|
|||
/**
|
||||
* Create a new server on the system.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\StoreServerRequest $request
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*
|
||||
* @throws \Throwable
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
|
@ -96,12 +84,6 @@ class ServerController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* Show a single server transformed for the application API.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\GetServerRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
*
|
||||
* @return array
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||
*/
|
||||
public function view(GetServerRequest $request, Server $server): array
|
||||
{
|
||||
|
@ -111,15 +93,7 @@ class ServerController extends ApplicationApiController
|
|||
}
|
||||
|
||||
/**
|
||||
* Deletes a server.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\ServerWriteRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param string $force
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*
|
||||
* @throws \Throwable
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
*/
|
||||
public function delete(ServerWriteRequest $request, Server $server, string $force = ''): Response
|
||||
{
|
||||
|
|
|
@ -24,9 +24,6 @@ class ServerDetailsController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* ServerDetailsController constructor.
|
||||
*
|
||||
* @param \Pterodactyl\Services\Servers\BuildModificationService $buildModificationService
|
||||
* @param \Pterodactyl\Services\Servers\DetailsModificationService $detailsModificationService
|
||||
*/
|
||||
public function __construct(
|
||||
BuildModificationService $buildModificationService,
|
||||
|
@ -41,18 +38,15 @@ class ServerDetailsController extends ApplicationApiController
|
|||
/**
|
||||
* Update the details for a specific server.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\UpdateServerDetailsRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||
* @throws \Throwable
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function details(UpdateServerDetailsRequest $request, Server $server): array
|
||||
{
|
||||
$server = $this->detailsModificationService->returnUpdatedModel()->handle(
|
||||
$server, $request->validated()
|
||||
$server,
|
||||
$request->validated()
|
||||
);
|
||||
|
||||
return $this->fractal->item($server)
|
||||
|
@ -65,11 +59,11 @@ class ServerDetailsController extends ApplicationApiController
|
|||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\UpdateServerBuildConfigurationRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws \Throwable
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function build(UpdateServerBuildConfigurationRequest $request, Server $server): array
|
||||
{
|
||||
|
|
|
@ -23,9 +23,6 @@ class ServerManagementController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* SuspensionController constructor.
|
||||
*
|
||||
* @param \Pterodactyl\Services\Servers\ReinstallServerService $reinstallServerService
|
||||
* @param \Pterodactyl\Services\Servers\SuspensionService $suspensionService
|
||||
*/
|
||||
public function __construct(
|
||||
ReinstallServerService $reinstallServerService,
|
||||
|
@ -40,11 +37,6 @@ class ServerManagementController extends ApplicationApiController
|
|||
/**
|
||||
* Suspend a server on the Panel.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\ServerWriteRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function suspend(ServerWriteRequest $request, Server $server): Response
|
||||
|
@ -57,11 +49,6 @@ class ServerManagementController extends ApplicationApiController
|
|||
/**
|
||||
* Unsuspend a server on the Panel.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\ServerWriteRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function unsuspend(ServerWriteRequest $request, Server $server): Response
|
||||
|
@ -74,12 +61,9 @@ class ServerManagementController extends ApplicationApiController
|
|||
/**
|
||||
* Mark a server as needing to be reinstalled.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\ServerWriteRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*
|
||||
* @throws \Throwable
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function reinstall(ServerWriteRequest $request, Server $server): Response
|
||||
{
|
||||
|
|
|
@ -18,8 +18,6 @@ class StartupController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* StartupController constructor.
|
||||
*
|
||||
* @param \Pterodactyl\Services\Servers\StartupModificationService $modificationService
|
||||
*/
|
||||
public function __construct(StartupModificationService $modificationService)
|
||||
{
|
||||
|
@ -31,11 +29,10 @@ class StartupController extends ApplicationApiController
|
|||
/**
|
||||
* Update the startup and environment settings for a specific server.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\UpdateServerStartupRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
*
|
||||
* @return array
|
||||
* @throws \Throwable
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function index(UpdateServerStartupRequest $request, Server $server): array
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue