This commit is contained in:
2026-07-07 11:46:08 +08:00
parent 3574a9f1cf
commit ac869d351f
5 changed files with 18 additions and 15 deletions
+3 -1
View File
@@ -227,7 +227,7 @@ async def get_join_info_public(
"""公开接口:验证邀请码并返回团队信息(无需登录)。"""
invitation = await team_invitation_service.get_invitation_by_code(db, code)
if not invitation:
return {"team_name": "", "team_id": "", "valid": False}
return {"team_name": "", "team_id": "", "valid": False, "already_in_team": False, "has_pending_request": False}
team = await db.execute(
select(Team.name).where(Team.id == invitation.team_id, Team.deleted_at.is_(None)).limit(1)
@@ -238,6 +238,8 @@ async def get_join_info_public(
"team_name": team_name,
"team_id": invitation.team_id,
"valid": True,
"already_in_team": False,
"has_pending_request": False,
}