подгрузка данных для api из env

This commit is contained in:
2026-08-19 16:28:09 +03:00
parent bddc0967b3
commit c643a183d8
15 changed files with 891 additions and 86 deletions

View File

@@ -129,6 +129,11 @@ def install_ui_builder(
@app.get(editor_url, include_in_schema=False)
async def ui_builder_editor(request: Request):
# Runtime is the default landing mode, even if an old bookmark points
# directly at /editor. The visual editor is opened only explicitly
# from the runtime toolbar and carries ?open=1 after PIN auth.
if request.query_params.get("open") != "1":
return RedirectResponse(runtime_url, status_code=302)
if not auth.is_request_authenticated(request):
return RedirectResponse(runtime_url, status_code=302)
return render_page("editor")