feat: integrate tenant context across club-related APIs
- Refactored club join requests, memberships, and clubs routers to utilize TenantContext for authentication and authorization, enhancing security and consistency. - Updated session handling to replace direct session dictionary access with TenantContext, improving code clarity and maintainability. - Ensured proper role and profile ID retrieval from TenantContext in various endpoints, streamlining access control for club management functionalities.
This commit is contained in:
1 parent
870a7611dc
commit
5aee9c52fc
9 files changed
+294
-182
No files matched your search
@@ -78,8 +78,8 @@ def get_me(session: dict=Depends(require_auth)):
|
||||
"""Get current user info."""
|
||||
pid = session['profile_id']
|
||||
# Import here to avoid circular dependency
|
||||
from routers.profiles import get_profile
|
||||
return get_profile(pid, session)
|
||||
from routers.profiles import profile_document
|
||||
return profile_document(pid)
|
||||
|
||||
|
||||
@router.get("/status")
|
||||
|
||||
Reference in new issue
Block a user