chore: 后端 agent 和 users 模块代码更新优化

This commit is contained in:
qzl
2026-03-10 17:44:29 +08:00
parent 8da9377ed9
commit 2049184456
9 changed files with 294 additions and 81 deletions
+4
View File
@@ -90,9 +90,11 @@ class UserService(BaseService):
if user is None:
raise HTTPException(status_code=404, detail="User not found")
email = self._current_user.email if self._current_user else None
return UserResponse(
id=str(user.id),
username=user.username,
email=email,
avatar_url=user.avatar_url,
bio=user.bio,
)
@@ -131,9 +133,11 @@ class UserService(BaseService):
error=str(exc),
)
email = self._current_user.email if self._current_user else None
return UserResponse(
id=str(user.id),
username=user.username,
email=email,
avatar_url=user.avatar_url,
bio=user.bio,
)