25 lines
905 B
PHP
25 lines
905 B
PHP
<?php
|
|
|
|
namespace Pterodactyl\Http\Controllers\Api\Application\Servers;
|
|
|
|
use Pterodactyl\Transformers\Api\Application\ServerTransformer;
|
|
use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
|
|
use Pterodactyl\Http\Requests\Api\Application\Servers\GetExternalServerRequest;
|
|
|
|
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
|
|
{
|
|
return $this->fractal->item($request->getServerModel())
|
|
->transformWith($this->getTransformer(ServerTransformer::class))
|
|
->toArray();
|
|
}
|
|
}
|