diff --git a/routers/bubblewords.py b/routers/bubblewords.py index 573d072..cf55cc5 100644 --- a/routers/bubblewords.py +++ b/routers/bubblewords.py @@ -379,13 +379,18 @@ async def complete_bubble_level(request: Request): score = xp_result["points"] await conn.execute(""" - INSERT INTO bubble_words_progress (user_id, levels_completed, total_score, level, current_hints_used) - VALUES ($1, 1, $2, $3, 0) + INSERT INTO bubble_words_progress + (user_id, levels_completed, total_score, level, + current_hints_used, current_list_opened, current_level_words, hinted_words) + VALUES ($1, 1, $2, $3, 0, 0, '[]'::jsonb, '{}') ON CONFLICT (user_id) DO UPDATE SET levels_completed = bubble_words_progress.levels_completed + 1, total_score = bubble_words_progress.total_score + $2, level = $3, - current_hints_used = 0 + current_hints_used = 0, + current_list_opened = 0, + current_level_words = '[]'::jsonb, + hinted_words = '{}' """, telegram_id, score, current_level) # Данные для достижений