fix context; decoupling decode_token algo

This commit is contained in:
2026-05-20 15:40:59 +08:00
parent b95cce592f
commit d2162f93e0
3 changed files with 19 additions and 4 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ class Query:
@strawberry.field
async def me(self, info: Info[CustomContext, None]) -> Optional[UserType]:
# 从 context 获取当前登录用户
user = await info.context. xzz()
user = await info.context.get_current_user()
# Strawberry 会自动将 SQLAlchemy 实例映射为 UserType
return user