[Eva] Ева, патч 21 применён — теперь ты можешь #41

Merged
Drobysh merged 8 commits from eva/chat-b7c183-backend into main 2026-10-14 09:25:07 +00:00
Showing only changes of commit 07d2d197fd - Show all commits
+7 -4
View File
@@ -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.