Isseu: Pterodactyl zero allocations found #24
This commit is contained in:
parent
933e56101c
commit
137f54818d
|
@ -49,9 +49,13 @@ class Pterodactyl
|
||||||
$response = self::getAllocations($node);
|
$response = self::getAllocations($node);
|
||||||
$freeAllocations = [];
|
$freeAllocations = [];
|
||||||
|
|
||||||
|
if(isset($response['data'])){
|
||||||
|
if (!empty($response['data'])) {
|
||||||
foreach ($response['data'] as $allocation) {
|
foreach ($response['data'] as $allocation) {
|
||||||
if (!$allocation['attributes']['assigned']) array_push($freeAllocations, $allocation);
|
if (!$allocation['attributes']['assigned']) array_push($freeAllocations, $allocation);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $freeAllocations;
|
return $freeAllocations;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue