Skip to content

Commit

Permalink
fix: Suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KShivendu committed Aug 3, 2023
1 parent 81cb3fd commit fbcd035
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ async def handle_sessions_get(
if user_id is None:
raise_bad_input_exception("Missing required parameter 'userId'")

# TODO: Pass tenant id here
# Not passing tenant_id because we want to get all the sessions
# across all the tenants for this user.
session_handles = await get_all_session_handles_for_user(
user_id, "pass-tenant-id", user_context
user_id, None, user_context
)
sessions: List[Optional[SessionInfo]] = [None for _ in session_handles]

Expand Down
4 changes: 2 additions & 2 deletions supertokens_python/recipe/session/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ async def revoke_all_sessions_for_user(
self,
user_id: str,
tenant_id: str,
revoke_across_all_tenants: Optional[bool],
revoke_across_all_tenants: bool,
user_context: Dict[str, Any],
) -> List[str]:
pass
Expand All @@ -229,7 +229,7 @@ async def get_all_session_handles_for_user(
self,
user_id: str,
tenant_id: str,
fetch_across_all_tenants: Optional[bool],
fetch_across_all_tenants: bool,
user_context: Dict[str, Any],
) -> List[str]:
pass
Expand Down
4 changes: 2 additions & 2 deletions supertokens_python/recipe/session/recipe_implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ async def revoke_all_sessions_for_user(
self,
user_id: str,
tenant_id: Optional[str],
revoke_across_all_tenants: Optional[bool],
revoke_across_all_tenants: bool,
user_context: Dict[str, Any],
) -> List[str]:
return await session_functions.revoke_all_sessions_for_user(
Expand All @@ -341,7 +341,7 @@ async def get_all_session_handles_for_user(
self,
user_id: str,
tenant_id: Optional[str],
fetch_across_all_tenants: Optional[bool],
fetch_across_all_tenants: bool,
user_context: Dict[str, Any],
) -> List[str]:
return await session_functions.get_all_session_handles_for_user(
Expand Down
4 changes: 2 additions & 2 deletions supertokens_python/recipe/session/session_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ async def revoke_all_sessions_for_user(
recipe_implementation: RecipeImplementation,
user_id: str,
tenant_id: Optional[str],
revoke_across_all_tenants: Optional[bool],
revoke_across_all_tenants: bool,
) -> List[str]:
if tenant_id is None:
tenant_id = DEFAULT_TENANT_ID
Expand All @@ -408,7 +408,7 @@ async def get_all_session_handles_for_user(
recipe_implementation: RecipeImplementation,
user_id: str,
tenant_id: Optional[str],
fetch_across_all_tenants: Optional[bool],
fetch_across_all_tenants: bool,
) -> List[str]:
if tenant_id is None:
tenant_id = DEFAULT_TENANT_ID
Expand Down

0 comments on commit fbcd035

Please sign in to comment.