Fix POST returning empty JSON body, v1.0.8

This commit is contained in:
2026-07-24 08:18:18 +04:00
parent 098cc2ace6
commit d91b3cc446
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -20,4 +20,7 @@ class HttpClient:
kwargs.setdefault("timeout", 30)
r = self._session.post(f"{self._endpoint}{path}", json=data, **kwargs)
r.raise_for_status()
return r.json()
try:
return r.json()
except Exception:
return {}
+1 -1
View File
@@ -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.7"
VERSION = "1.0.8"
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")