Update the rest of the logic
This commit is contained in:
parent
2c72fdc716
commit
0b8b6a5272
3 changed files with 3 additions and 39 deletions
|
@ -8,7 +8,6 @@ use Pterodactyl\Facades\Activity;
|
|||
use Psr\Http\Message\ResponseInterface;
|
||||
use GuzzleHttp\Exception\BadResponseException;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
use Pterodactyl\Repositories\Wings\DaemonCommandRepository;
|
||||
use Pterodactyl\Http\Controllers\Api\Client\ClientApiController;
|
||||
use Pterodactyl\Http\Requests\Api\Client\Servers\SendCommandRequest;
|
||||
use Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException;
|
||||
|
@ -18,7 +17,7 @@ class CommandController extends ClientApiController
|
|||
/**
|
||||
* CommandController constructor.
|
||||
*/
|
||||
public function __construct(private DaemonCommandRepository $repository)
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
@ -31,7 +30,7 @@ class CommandController extends ClientApiController
|
|||
public function index(SendCommandRequest $request, Server $server): Response
|
||||
{
|
||||
try {
|
||||
$this->repository->setServer($server)->send($request->input('command'));
|
||||
$server->send($request->input('command'));
|
||||
} catch (DaemonConnectionException $exception) {
|
||||
$previous = $exception->getPrevious();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue