Skip to content

Commit 4727210

Browse files
committed
fix: Pass tenant id in functions used by dashboard APIs
1 parent a5f1e2b commit 4727210

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

supertokens_python/recipe/dashboard/api/analytics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
async def handle_analytics_post(
3838
_: APIInterface,
39-
_tenant_id: str,
39+
tenant_id: str,
4040
api_options: APIOptions,
4141
_user_context: Dict[str, Any],
4242
) -> AnalyticsResponse:
@@ -68,7 +68,7 @@ async def handle_analytics_post(
6868
telemetry_id = response["telemetryId"]
6969

7070
number_of_users = await Supertokens.get_instance().get_user_count(
71-
include_recipe_ids=None
71+
include_recipe_ids=None, tenant_id=tenant_id,
7272
)
7373

7474
except Exception as __:

supertokens_python/recipe/dashboard/api/userdetails/user_sessions_get.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
async def handle_sessions_get(
1919
_api_interface: APIInterface,
20-
_tenant_id: str,
20+
tenant_id: str,
2121
api_options: APIOptions,
2222
user_context: Dict[str, Any],
2323
) -> UserSessionsGetAPIResponse:
@@ -26,9 +26,8 @@ async def handle_sessions_get(
2626
if user_id is None:
2727
raise_bad_input_exception("Missing required parameter 'userId'")
2828

29-
# TODO: Pass tenant id here
3029
session_handles = await get_all_session_handles_for_user(
31-
user_id, "pass-tenant-id", user_context
30+
user_id, tenant_id, user_context
3231
)
3332
sessions: List[Optional[SessionInfo]] = [None for _ in session_handles]
3433

0 commit comments

Comments
 (0)