reinstallServerService = $reinstallServerService; $this->suspensionService = $suspensionService; } /** * Suspend a server on the Panel. * * @param \Pterodactyl\Http\Requests\Api\Application\Servers\ServerWriteRequest $request * @param \Pterodactyl\Models\Server $server * * @return \Illuminate\Http\Response * * @throws \Throwable */ public function suspend(ServerWriteRequest $request, Server $server): Response { $this->suspensionService->toggle($server, SuspensionService::ACTION_SUSPEND); return $this->returnNoContent(); } /** * Unsuspend a server on the Panel. * * @param \Pterodactyl\Http\Requests\Api\Application\Servers\ServerWriteRequest $request * @param \Pterodactyl\Models\Server $server * * @return \Illuminate\Http\Response * * @throws \Throwable */ public function unsuspend(ServerWriteRequest $request, Server $server): Response { $this->suspensionService->toggle($server, SuspensionService::ACTION_UNSUSPEND); return $this->returnNoContent(); } /** * Mark a server as needing to be reinstalled. * * @param \Pterodactyl\Http\Requests\Api\Application\Servers\ServerWriteRequest $request * @param \Pterodactyl\Models\Server $server * * @return \Illuminate\Http\Response * * @throws \Throwable */ public function reinstall(ServerWriteRequest $request, Server $server): Response { $this->reinstallServerService->handle($server); return $this->returnNoContent(); } }