mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 14:23:44 +02:00
Cleanup frontend controllers and middleware
This commit is contained in:
@@ -51,17 +51,13 @@ class SubuserDeletionService
|
||||
/**
|
||||
* Delete a subuser and their associated permissions from the Panel and Daemon.
|
||||
*
|
||||
* @param int|\Pterodactyl\Models\Subuser $subuser
|
||||
* @param \Pterodactyl\Models\Subuser $subuser
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function handle($subuser)
|
||||
public function handle(Subuser $subuser)
|
||||
{
|
||||
if (! $subuser instanceof Subuser) {
|
||||
$subuser = $this->repository->find($subuser);
|
||||
}
|
||||
|
||||
$this->connection->beginTransaction();
|
||||
$this->keyDeletionService->handle($subuser->server_id, $subuser->user_id);
|
||||
$this->repository->delete($subuser->id);
|
||||
|
||||
Reference in New Issue
Block a user