develop #3

Open
Alex wants to merge 77 commits from Alex/stcs:develop into stable
15 changed files with 829 additions and 346 deletions
Showing only changes of commit 54667db29b - Show all commits

View File

@@ -390,3 +390,15 @@ async def update_user_timer(tg_id, minutes: int):
except Exception as e: except Exception as e:
logging.error(f"Ошибка обновления таймера пользователя {tg_id}: {e}") logging.error(f"Ошибка обновления таймера пользователя {tg_id}: {e}")
async def get_martingale_step(tg_id):
async with async_session() as session:
result = await session.execute(select(UMS).where(UMS.tg_id == tg_id))
user_settings = result.scalars().first()
return user_settings.martingale_step
async def update_martingale_step(tg_id, step):
async with async_session() as session:
await session.execute(update(UMS).where(UMS.tg_id == tg_id).values(martingale_step = step))
await session.commit()