From 07d2d197fdf485241a173fc4ecafea1718dabc42 Mon Sep 17 00:00:00 2001 From: Drobysh Date: Wed, 14 Oct 2026 09:19:59 +0000 Subject: [PATCH] =?UTF-8?q?[Eva]=20bubblewords:=20=D1=87=D0=B8=D1=82=D0=B0?= =?UTF-8?q?=D1=82=D1=8C=20=D1=81=D0=B5=D1=80=D0=B2=D0=B5=D1=80=D0=BD=D1=8B?= =?UTF-8?q?=D0=B5=20=D1=81=D1=87=D1=91=D1=82=D1=87=D0=B8=D0=BA=D0=B8=20hin?= =?UTF-8?q?ts+list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/bubblewords.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/routers/bubblewords.py b/routers/bubblewords.py index d8b9b90..573d072 100644 --- a/routers/bubblewords.py +++ b/routers/bubblewords.py @@ -348,12 +348,15 @@ async def complete_bubble_level(request: Request): current_level = user["current_level"] or "A1" difficulty = user["difficulty"] or "medium" - # Читаем серверный hints_used - hints_used = await conn.fetchval( - "SELECT current_hints_used FROM bubble_words_progress WHERE user_id = $1", + # Читаем серверные счётчики (не из body) + progress = await conn.fetchrow( + "SELECT current_hints_used, current_list_opened " + "FROM bubble_words_progress WHERE user_id = $1", telegram_id - ) or 0 + ) + hints_used = (progress["current_hints_used"] if progress else 0) or 0 hints_used = min(max(0, hints_used), 3) + list_opened = (progress["current_list_opened"] if progress else 0) or 0 # 🔧 НОВОЕ (14.10.2026): очки по формуле филворда. # Hard — фикс 110. Easy/Medium — 100 − 20×hints − 20×list + bonus.