feat app: use new api url placeholder inside of telemetryservice :v

This commit is contained in:
prplwtf 2024-04-18 18:16:57 +02:00
parent 5db650c703
commit 8aed7bb9b7

View file

@ -3,6 +3,7 @@
namespace Pterodactyl\BlueprintFramework\Services\TelemetryService;
use Pterodactyl\Contracts\Repository\SettingsRepositoryInterface;
use Pterodactyl\BlueprintFramework\Services\ConfigService\BlueprintConfigService;
use Pterodactyl\BlueprintFramework\Services\PlaceholderService\BlueprintPlaceholderService;
class BlueprintTelemetryService
{
@ -10,6 +11,7 @@ class BlueprintTelemetryService
public function __construct(
private SettingsRepositoryInterface $settings,
private BlueprintConfigService $ConfigService,
private BlueprintPlaceholderService $PlaceholderService,
) {
}
@ -19,7 +21,7 @@ class BlueprintTelemetryService
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://api.blueprint.zip:50000/send/'.$this->settings->get('blueprint::panel:id')."/".$event."/",
CURLOPT_URL => $this->PlaceholderService->api_url().'/send/'.$this->settings->get('blueprint::panel:id')."/".$event."/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,