This commit is contained in:
2026-07-07 11:07:15 +08:00
parent 88bdccd727
commit d80f5c3577
4 changed files with 34 additions and 33 deletions
-7
View File
@@ -37,11 +37,6 @@ from app.services.team_manager_service import (
router = APIRouter(prefix="/team", tags=["team"])
def _build_invite_link(code: str) -> str:
base = getattr(settings, "FRONTEND_URL", "") or getattr(settings, "BASE_URL", "")
return f"{base}/join-team?code={code}"
# ── 获取当前用户管理的团队 ──────────────────────────────
@router.get("/managed")
async def get_managed_team_info(
@@ -135,7 +130,6 @@ async def create_invitation(
"max_uses": invitation.max_uses,
"use_count": invitation.use_count,
"expires_at": invitation.expires_at,
"invite_link": _build_invite_link(invitation.code),
"created_at": invitation.created_at,
}
@@ -158,7 +152,6 @@ async def list_invitations(
"max_uses": inv.max_uses,
"use_count": inv.use_count,
"expires_at": inv.expires_at,
"invite_link": _build_invite_link(inv.code),
"created_at": inv.created_at,
}
for inv in invitations