diff --git a/routers/bubblewords.py b/routers/bubblewords.py index 0bc4899..8cdf7bd 100644 --- a/routers/bubblewords.py +++ b/routers/bubblewords.py @@ -195,9 +195,11 @@ async def complete_bubble_level(request: Request): if not user_exists: raise HTTPException(401, "User not registered") - current_level = await conn.fetchval( - "SELECT current_level FROM users WHERE telegram_id = $1", telegram_id - ) or "A1" + user = await conn.fetchrow( + "SELECT current_level, difficulty FROM users WHERE telegram_id = $1", telegram_id + ) + current_level = user["current_level"] or "A1" + difficulty = user["difficulty"] or "medium" # Читаем серверный hints_used hints_used = await conn.fetchval(