cleanup
This commit is contained in:
parent
8c7c938c6a
commit
bf5c36b232
2 changed files with 23 additions and 23 deletions
|
@ -14,17 +14,6 @@ use Illuminate\Support\Facades\Http;
|
|||
|
||||
class Pterodactyl
|
||||
{
|
||||
/**
|
||||
* @return null
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function getNests()
|
||||
{
|
||||
$response = self::client()->get('/application/nests');
|
||||
if ($response->failed()) throw self::getException();
|
||||
return $response->json()['data'];
|
||||
}
|
||||
|
||||
//TODO: Extend error handling (maybe logger for more errors when debugging)
|
||||
|
||||
/**
|
||||
|
@ -70,6 +59,17 @@ class Pterodactyl
|
|||
return $response->json()['data'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function getNests()
|
||||
{
|
||||
$response = self::client()->get('/application/nests');
|
||||
if ($response->failed()) throw self::getException();
|
||||
return $response->json()['data'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
* @throws Exception
|
||||
|
@ -84,10 +84,10 @@ class Pterodactyl
|
|||
/**
|
||||
* @param Node $node
|
||||
* @return mixed
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function getFreeAllocationId(Node $node)
|
||||
{
|
||||
|
||||
return self::getFreeAllocations($node)[0]['attributes']['id'] ?? null;
|
||||
}
|
||||
|
||||
|
@ -114,6 +114,7 @@ class Pterodactyl
|
|||
|
||||
/**
|
||||
* @param Node $node
|
||||
* @return array|mixed
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function getAllocations(Node $node)
|
||||
|
|
|
@ -51,7 +51,6 @@ class OverViewController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description Sync locations,nodes,nests,eggs with the linked pterodactyl panel
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue