INNER CODE UNIT · Python

show_results

stanfrbd/cyberbro · app.py:273

def show_results(analysis_id: str) -> tuple[str, int]:
    """Show the results of the analysis."""

    # If URL includes "?display=table", force a table view of results
    display: str = request.args.get("display", "default")
    analysis_results = db.session.get(AnalysisResult, analysis_id)
    if analysis_results:
        return render_template(
            "results.html",
            analysis_results=analysis_results,
            API_PREFIX=API_PREFIX,
            display_mode=display,
        ), 200
    return render_template("404.html"), 404


@app.route(f"/{API_PREFIX}/is_analysis_complete/<analysis_id>", methods=["GET"])
def is_analysis_complete(analysis_id: str) -> Response:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…