misc_pterodactyl-panel/app/Http/Controllers/Api/Application/Users/ExternalUserController.php
2018-02-07 21:56:11 -06:00

23 lines
804 B
PHP

<?php
namespace Pterodactyl\Http\Controllers\Api\Application\Users;
use Pterodactyl\Transformers\Api\Application\UserTransformer;
use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
use Pterodactyl\Http\Requests\Api\Application\Users\GetExternalUserRequest;
class ExternalUserController extends ApplicationApiController
{
/**
* Retrieve a specific user from the database using their external ID.
*
* @param \Pterodactyl\Http\Requests\Api\Application\Users\GetExternalUserRequest $request
* @return array
*/
public function index(GetExternalUserRequest $request): array
{
return $this->fractal->item($request->getUserModel())
->transformWith($this->getTransformer(UserTransformer::class))
->toArray();
}
}