INNER CODE UNIT · Python

stats

stanfrbd/cyberbro · app.py:390

def stats() -> tuple[str, int]:
    """Render the stats page."""
    stats = get_analysis_stats()
    return render_template("stats.html", stats=stats), 200


@app.route("/about")
def about() -> tuple[str, int]:
    """Render the about page."""
    return render_template("about.html", version=app.config["VERSION"]), 200


@app.route(f"/{API_PREFIX}/results/<analysis_id>", methods=["GET"])
def get_results(analysis_id: str) -> tuple[Response, int]:
    """Get the results of the analysis."""
    analysis_results = db.session.get(AnalysisResult, analysis_id)
    if analysis_results:
        return jsonify(analysis_results.results), 200

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…