From a1be6113dba6183883b416701eb1d97ef278d7ab Mon Sep 17 00:00:00 2001 From: rsgrinko Date: Thu, 31 Jul 2025 17:15:37 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA?= =?UTF-8?q?=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B0=20=D1=81=D1=82?= =?UTF-8?q?=D1=80=D1=83=D0=BA=D1=82=D1=83=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/bootstrap.php | 5 +---- inc/composer.json | 2 +- inc/lib/Narodmon.php | 2 ++ inc/lib/Prometheus.php | 2 +- inc/lib/YandexIoT.php | 12 +++++++++--- prometheus.php | 6 ++++++ 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/inc/bootstrap.php b/inc/bootstrap.php index 3a1bf4d..6429f20 100644 --- a/inc/bootstrap.php +++ b/inc/bootstrap.php @@ -1,12 +1,9 @@ accessToken = $data['access_token'] ?? null; + $this->accessToken = $data['access_token'] ?? null; $this->refreshToken = $data['access_token'] ?? null; return $this; } @@ -43,8 +45,12 @@ class YandexIoT * @return array * @throws JsonException */ - public static function sendRequest(string $url, array $headers = [], ?array $data = null, ?string $method = null): array - { + public static function sendRequest( + string $url, + array $headers = [], + ?array $data = null, + ?string $method = null + ): array { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); diff --git a/prometheus.php b/prometheus.php index 7eaf0cd..aa72022 100644 --- a/prometheus.php +++ b/prometheus.php @@ -1,5 +1,11 @@