From 4a739e4b1b7545e763e8097d3ee5c2d1e421c1c6 Mon Sep 17 00:00:00 2001 From: user Date: Mon, 17 Mar 2025 13:47:22 +0300 Subject: [PATCH] fix misprint --- app/api/routes/auth.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/api/routes/auth.py b/app/api/routes/auth.py index 01b1380..948e3be 100644 --- a/app/api/routes/auth.py +++ b/app/api/routes/auth.py @@ -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(),