Add deletion code to the panel
This commit is contained in:
parent
04d67eaa10
commit
ef5d0fb4a2
1 changed files with 10 additions and 2 deletions
|
@ -72,11 +72,19 @@ class DaemonServerRepository extends DaemonRepository
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a server from the daemon.
|
* Delete a server from the daemon, forcibly if passed.
|
||||||
|
*
|
||||||
|
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
|
||||||
*/
|
*/
|
||||||
public function delete(): void
|
public function delete(): void
|
||||||
{
|
{
|
||||||
throw new BadMethodCallException('Method is not implemented.');
|
Assert::isInstanceOf($this->server, Server::class);
|
||||||
|
|
||||||
|
try {
|
||||||
|
$this->getHttpClient()->delete('/api/servers/' . $this->server->uuid);
|
||||||
|
} catch (TransferException $exception) {
|
||||||
|
throw new DaemonConnectionException($exception);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue