fix: direct imports (no site. prefix, no relative) — works with python site/app.py
Deploy contracts-flask / validate (push) Successful in 0s

This commit is contained in:
2026-07-15 11:37:57 +04:00
parent 15137f8e94
commit f9669755cd
18 changed files with 61 additions and 61 deletions
+5 -5
View File
@@ -1,9 +1,9 @@
"""API blueprint — groups, documents, supplements, sync, cleanup, spec-current, chat."""
from flask import Blueprint, request, jsonify
from .db import documents, supplements, spec_current
from .db.connection import execute, query
from .services.grouping import group_documents, apply_groups
from .config import LLM_URL, LLM_KEY, LLM_MODEL
from db import documents, supplements, spec_current
from db.connection import execute, query
from services.grouping import group_documents, apply_groups
from config import LLM_URL, LLM_KEY, LLM_MODEL
import httpx
api_bp = Blueprint("api", __name__)
@@ -177,6 +177,6 @@ def chat():
@api_bp.route("/api/cleanup", methods=["POST"])
def api_cleanup():
"""Полная очистка: os.remove(DB) + init новой. Данные гарантированно стёрты."""
from .db.connection import cleanup_db
from db.connection import cleanup_db
cleanup_db()
return jsonify(ok=True, message="all data cleaned")