fix: 🐛 Typo in clientAdmin
This commit is contained in:
parent
6331ea0b66
commit
08b3bd4dc0
|
@ -33,7 +33,7 @@ class Pterodactyl
|
||||||
])->baseUrl(config("SETTINGS::SYSTEM:PTERODACTYL:URL") . '/api');
|
])->baseUrl(config("SETTINGS::SYSTEM:PTERODACTYL:URL") . '/api');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function clientadmin()
|
public static function clientAdmin()
|
||||||
{
|
{
|
||||||
return Http::withHeaders([
|
return Http::withHeaders([
|
||||||
'Authorization' => 'Bearer ' . config("SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN"),
|
'Authorization' => 'Bearer ' . config("SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN"),
|
||||||
|
@ -95,7 +95,7 @@ class Pterodactyl
|
||||||
if ($response->failed()) throw self::getException("Failed to get nodes from pterodactyl - ", $response->status());
|
if ($response->failed()) throw self::getException("Failed to get nodes from pterodactyl - ", $response->status());
|
||||||
return $response->json()['data'];
|
return $response->json()['data'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -110,8 +110,8 @@ class Pterodactyl
|
||||||
if($response->failed()) throw self::getException("Failed to get node id " . $id . " - " . $response->status());
|
if($response->failed()) throw self::getException("Failed to get node id " . $id . " - " . $response->status());
|
||||||
return $response->json()['attributes'];
|
return $response->json()['attributes'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static function getServers() {
|
public static function getServers() {
|
||||||
try {
|
try {
|
||||||
|
@ -328,7 +328,7 @@ class Pterodactyl
|
||||||
|
|
||||||
public static function powerAction(Server $server, $action)
|
public static function powerAction(Server $server, $action)
|
||||||
{
|
{
|
||||||
return self::clientadmin()->post("/client/servers/{$server->identifier}/power", [
|
return self::clientAdmin()->post("/client/servers/{$server->identifier}/power", [
|
||||||
"signal" => $action
|
"signal" => $action
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue