fix misprint
This commit is contained in:
parent
1a1f4301cf
commit
4a739e4b1b
|
|
@ -109,7 +109,7 @@ async def s_api_v1_auth_twa(request):
|
||||||
WalletConnection.network == 'ton',
|
WalletConnection.network == 'ton',
|
||||||
WalletConnection.invalidated == False
|
WalletConnection.invalidated == False
|
||||||
)
|
)
|
||||||
))).order_by(WalletConnection.created.desc()).scalars().first()
|
).order_by(WalletConnection.created.desc()))).scalars().first()
|
||||||
known_user.last_use = datetime.now()
|
known_user.last_use = datetime.now()
|
||||||
request.ctx.db_session.commit()
|
request.ctx.db_session.commit()
|
||||||
|
|
||||||
|
|
@ -123,13 +123,15 @@ async def s_api_v1_auth_me(request):
|
||||||
if not request.ctx.user:
|
if not request.ctx.user:
|
||||||
return response.json({"error": "Unauthorized"}, status=401)
|
return response.json({"error": "Unauthorized"}, status=401)
|
||||||
|
|
||||||
ton_connection = (request.ctx.db_session.execute(select(WalletConnection).where(
|
ton_connection = (request.ctx.db_session.execute(
|
||||||
and_(
|
select(WalletConnection).where(
|
||||||
WalletConnection.user_id == request.ctx.user.id,
|
and_(
|
||||||
WalletConnection.network == 'ton',
|
WalletConnection.user_id == request.ctx.user.id,
|
||||||
WalletConnection.invalidated == False
|
WalletConnection.network == 'ton',
|
||||||
)
|
WalletConnection.invalidated == False
|
||||||
))).order_by(WalletConnection.created.desc()).scalars().first()
|
)
|
||||||
|
).order_by(WalletConnection.created.desc())
|
||||||
|
)).scalars().first()
|
||||||
|
|
||||||
return response.json({
|
return response.json({
|
||||||
'user': request.ctx.user.json_format(),
|
'user': request.ctx.user.json_format(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue