帐号治理-帐号管理--更新

This commit is contained in:
Cheng Zhou
2025-12-18 19:14:38 +08:00
parent f6b89cb8c4
commit eed83cec5a
23 changed files with 233 additions and 30 deletions
+5
View File
@@ -62,3 +62,8 @@ async def remove_member(db: AsyncSession, member: StudyMember) -> StudyMember:
await db.commit()
await db.refresh(member)
return member
async def user_has_memberships(db: AsyncSession, user_id: uuid.UUID) -> bool:
result = await db.execute(select(StudyMember.id).where(StudyMember.user_id == user_id))
return result.first() is not None