Add HTML5 import preflight check
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-16 21:39:26 +03:00
parent 86f64de08f
commit 52caf1b331
3 changed files with 72 additions and 1 deletions
@@ -40,6 +40,7 @@ from api_server.html5 import (
render_html5_index,
render_html5_project_setup,
render_html5_project_rows,
render_html5_import_check,
render_html5_setup_summary,
render_html5_source,
render_html5_status,
@@ -1692,6 +1693,17 @@ async def html5_project_setup_source(project_id: str, request: Request) -> Respo
)
@app.post("/html5/projects/{project_id}/setup/check")
async def html5_project_setup_check(project_id: str, request: Request) -> Response:
form = await _html5_form_data(request)
source = ImportSourceKind(_form_value(form, "source") or _current_import_source(project_id).value)
check = _import_check_response(project_id, source, ImportRequest(source=source))
return Response(
render_html5_import_check(project_id, check),
media_type="text/html; charset=utf-8",
)
@app.post("/html5/projects/{project_id}/setup/import")
async def html5_project_setup_import(project_id: str, request: Request) -> Response:
form = await _html5_form_data(request)