From 31cba53798cbc9772f9a069cb2e86d23d040447b Mon Sep 17 00:00:00 2001 From: Repinoid Date: Mon, 8 Jun 2026 11:48:14 +0400 Subject: [PATCH] =?UTF-8?q?fix:=20sessions=20API=20=E2=80=94=20=D0=BD?= =?UTF-8?q?=D0=B5=D1=82=20=D0=BA=D0=BE=D0=BB=D0=BE=D0=BD=D0=BA=D0=B8=20tit?= =?UTF-8?q?le,=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D1=83=D0=B5?= =?UTF-8?q?=D0=BC=20vin/car=5Finfo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/routes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/routes.py b/api/routes.py index e9ec71b..113fb45 100644 --- a/api/routes.py +++ b/api/routes.py @@ -248,13 +248,13 @@ def register(app): return _auth_error() with Database() as db: rows = db.conn.execute( - "SELECT id, title, created_at, uploaded, diagnosis FROM sessions ORDER BY id DESC LIMIT 50" + "SELECT id, vin, car_info, created_at, diagnosis_text as diagnosis FROM sessions ORDER BY id DESC LIMIT 50" ).fetchall() return jsonify([{ "id": r["id"], - "title": r["title"] or "Диагностика", + "title": (r["vin"] or r["car_info"] or "Диагностика"), "created_at": r["created_at"], - "uploaded": r["uploaded"], + "uploaded": 1, "diagnosis": r["diagnosis"] or "" } for r in rows])