diff --git a/web/app.py b/web/app.py index cb8ef3f..c247052 100644 --- a/web/app.py +++ b/web/app.py @@ -12,7 +12,7 @@ from pathlib import Path # Добавляем корень проекта в PYTHONPATH sys.path.insert(0, str(Path(__file__).parent.parent)) -from flask import Flask, jsonify, render_template, request +from flask import Flask, jsonify, redirect, render_template, request, send_from_directory from elmer.config import load from elmer.db import Database @@ -36,6 +36,12 @@ def index(): return render_template("index.html") +@app.route("/elmer.apk") +def download_apk(): + """Прямая ссылка на APK.""" + return send_from_directory("static", "app-debug.apk", as_attachment=True, download_name="elmer.apk") + + @app.route("/api/diagnose", methods=["POST"]) def diagnose(): """Подключается к ELM327, читает данные, отправляет в LLM, возвращает результат.""" diff --git a/web/templates/index.html b/web/templates/index.html index 48ea4ce..898f309 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -15,7 +15,7 @@