setup profile edition

This commit is contained in:
2025-09-27 10:56:32 +03:00
parent 1a49545fff
commit 0875624aa5
6 changed files with 101 additions and 14 deletions

View File

@@ -20,3 +20,15 @@ async def create_user(
session.add(user)
await session.commit()
return user
async def update_user(
session: AsyncSession, tg_id: int, fullname: str = "", phone: str = ""
) -> None:
user = await get_user_by_tg_id(session, tg_id)
if fullname:
user.fullname = fullname
if phone:
user.phone = phone
await session.commit()
return user