Add modules: api, operations, routes with org display

This commit is contained in:
2026-07-23 11:28:11 +04:00
parent 5c16e75b0a
commit 51f4508c1d
6 changed files with 86 additions and 9 deletions
+21
View File
@@ -0,0 +1,21 @@
from flask import Blueprint, current_app, render_template
from api.http_client import HttpClient
from operations.get_instances import get_organization
bp = Blueprint("main", __name__)
@bp.route("/")
def index():
org = None
error = None
try:
client = HttpClient(
current_app.config["NUBES_API_ENDPOINT"],
current_app.config["NUBES_API_TOKEN"],
)
org = get_organization(client)
except Exception as e:
error = str(e)
return render_template("index.html", organization=org, error=error)