feat artisan
app
: use PlaceholderService for api url
This commit is contained in:
parent
0064ebef45
commit
5db650c703
2 changed files with 4 additions and 1 deletions
|
@ -7,4 +7,5 @@ class BlueprintPlaceholderService
|
|||
public function version(): string { return "::v"; }
|
||||
public function folder(): string { return "::f"; }
|
||||
public function installed(): string { return "NOTINSTALLED"; }
|
||||
public function api_url(): string { return "http://api.blueprint.zip:50000"; }
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
namespace Pterodactyl\Console\Commands\BlueprintFramework;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Pterodactyl\BlueprintFramework\Services\PlaceholderService\BlueprintPlaceholderService;
|
||||
|
||||
class LatestCommand extends Command
|
||||
{
|
||||
|
@ -13,6 +14,7 @@ class LatestCommand extends Command
|
|||
* LatestCommand constructor.
|
||||
*/
|
||||
public function __construct(
|
||||
private BlueprintPlaceholderService $PlaceholderService,
|
||||
) { parent::__construct(); }
|
||||
|
||||
/**
|
||||
|
@ -20,7 +22,7 @@ class LatestCommand extends Command
|
|||
*/
|
||||
public function handle()
|
||||
{
|
||||
$api_url = "http://api.blueprint.zip:50000/api/latest";
|
||||
$api_url = $this->PlaceholderService->api_url()."/api/latest";
|
||||
$context = stream_context_create([
|
||||
'http' => [
|
||||
'method' => 'GET',
|
||||
|
|
Loading…
Reference in a new issue