fix misprint

This commit is contained in:
user 2025-03-17 13:47:22 +03:00
parent 1a1f4301cf
commit 4a739e4b1b
1 changed files with 10 additions and 8 deletions

View File

@ -109,7 +109,7 @@ async def s_api_v1_auth_twa(request):
WalletConnection.network == 'ton',
WalletConnection.invalidated == False
)
))).order_by(WalletConnection.created.desc()).scalars().first()
).order_by(WalletConnection.created.desc()))).scalars().first()
known_user.last_use = datetime.now()
request.ctx.db_session.commit()
@ -123,13 +123,15 @@ async def s_api_v1_auth_me(request):
if not request.ctx.user:
return response.json({"error": "Unauthorized"}, status=401)
ton_connection = (request.ctx.db_session.execute(select(WalletConnection).where(
and_(
WalletConnection.user_id == request.ctx.user.id,
WalletConnection.network == 'ton',
WalletConnection.invalidated == False
)
))).order_by(WalletConnection.created.desc()).scalars().first()
ton_connection = (request.ctx.db_session.execute(
select(WalletConnection).where(
and_(
WalletConnection.user_id == request.ctx.user.id,
WalletConnection.network == 'ton',
WalletConnection.invalidated == False
)
).order_by(WalletConnection.created.desc())
)).scalars().first()
return response.json({
'user': request.ctx.user.json_format(),