Update to use new repository and standard laravel notation for controllers

This commit is contained in:
Dane Everitt 2019-09-05 21:31:12 -07:00
parent 62cd03d684
commit 26e4ff1f62
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 28 additions and 24 deletions

View file

@ -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) {