mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-02 20:35:50 -05:00
Update client API endpoints to not use deprecated function
This commit is contained in:
@@ -31,15 +31,14 @@ class ResourceUtilizationController extends ClientApiController
|
||||
* Return the current resource utilization for a server.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Client\Servers\GetServerRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return array
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
|
||||
*/
|
||||
public function __invoke(GetServerRequest $request): array
|
||||
public function __invoke(GetServerRequest $request, Server $server): array
|
||||
{
|
||||
$stats = $this->repository
|
||||
->setServer($request->getModel(Server::class))
|
||||
->getDetails();
|
||||
$stats = $this->repository->setServer($server)->getDetails();
|
||||
|
||||
return $this->fractal->item($stats)
|
||||
->transformWith($this->getTransformer(StatsTransformer::class))
|
||||
|
||||
Reference in New Issue
Block a user