forked from Alex/Pterodactyl-Panel
Fix call to getIncludesForTransformer
This commit is contained in:
parent
9e0ec8fca8
commit
1bc1b87422
@ -34,11 +34,10 @@ class ClientController extends ClientApiController
|
||||
public function index(GetServersRequest $request): array
|
||||
{
|
||||
$user = $request->user();
|
||||
$transformer = ServerTransformer::class;
|
||||
|
||||
// Start the query builder and ensure we eager load any requested relationships from the request.
|
||||
$builder = QueryBuilder::for(
|
||||
Server::query()->with($this->getIncludesForTransformer($transformer, ['node']))
|
||||
Server::query()->with($this->getIncludesForTransformer(new ServerTransformer(), ['node']))
|
||||
)->allowedFilters([
|
||||
'uuid',
|
||||
'name',
|
||||
@ -69,7 +68,7 @@ class ClientController extends ClientApiController
|
||||
|
||||
$servers = $builder->paginate(min($request->query('per_page', 50), 100))->appends($request->query());
|
||||
|
||||
return $this->fractal->transformWith($transformer)->collection($servers)->toArray();
|
||||
return $this->fractal->transformWith(new ServerTransformer())->collection($servers)->toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user