From 098cc2ace658186a3a87eb67c48f9270a2f683ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Fri, 24 Jul 2026 07:49:37 +0400 Subject: [PATCH] Add HttpClient.post, dummy-only, remove reconcile, v1.0.7 --- site/api/http_client.py | 6 ++++++ site/app.py | 2 +- site/templates/index.html | 16 +++++++++++----- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/site/api/http_client.py b/site/api/http_client.py index bc50fd8..9de0cfc 100644 --- a/site/api/http_client.py +++ b/site/api/http_client.py @@ -15,3 +15,9 @@ class HttpClient: r = self._session.get(f"{self._endpoint}{path}", **kwargs) r.raise_for_status() return r.json() + + def post(self, path, data=None, **kwargs): + kwargs.setdefault("timeout", 30) + r = self._session.post(f"{self._endpoint}{path}", json=data, **kwargs) + r.raise_for_status() + return r.json() diff --git a/site/app.py b/site/app.py index 7a31930..f4a23ee 100644 --- a/site/app.py +++ b/site/app.py @@ -6,7 +6,7 @@ from routes.main import bp as main_bp from routes.api import bp as api_bp from routes.api_test import bp as api_test_bp -VERSION = "1.0.6" +VERSION = "1.0.7" app = Flask(__name__, template_folder="templates", static_folder="static") app.config["NUBES_API_ENDPOINT"] = os.getenv("NUBES_API_ENDPOINT", "https://lk-api-gateway-dev.ngcloud.ru/api/v1/svc") diff --git a/site/templates/index.html b/site/templates/index.html index 0683038..1615c61 100644 --- a/site/templates/index.html +++ b/site/templates/index.html @@ -94,11 +94,17 @@