Update to use new repository and standard laravel notation for controllers
This commit is contained in:
parent
62cd03d684
commit
26e4ff1f62
2 changed files with 28 additions and 24 deletions
|
@ -36,14 +36,13 @@ class CommandController extends ClientApiController
|
|||
* Send a command to a running server.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Client\Servers\SendCommandRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\Response
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
|
||||
*/
|
||||
public function index(SendCommandRequest $request): Response
|
||||
public function index(SendCommandRequest $request, Server $server): Response
|
||||
{
|
||||
$server = $request->getModel(Server::class);
|
||||
|
||||
try {
|
||||
$this->repository->setServer($server)->send($request->input('command'));
|
||||
} catch (RequestException $exception) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue