From 927f0ad4b6867cc3381e33b61fdb2663090b7802 Mon Sep 17 00:00:00 2001 From: Health Kowshik Date: Mon, 12 Jan 2026 02:21:50 +0530 Subject: [PATCH] fix: update wearable connection attributes in WearablesService --- healthion-api/app/services/wearables_service.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/healthion-api/app/services/wearables_service.py b/healthion-api/app/services/wearables_service.py index 5e37492..f3b4c7f 100644 --- a/healthion-api/app/services/wearables_service.py +++ b/healthion-api/app/services/wearables_service.py @@ -152,14 +152,14 @@ async def get_connections( connections_data = await self.client.get_user_connections( user_id=user.open_wearables_user_id ) - + connections = [ WearableConnection( id=UUID(c.get("id", "")), provider=c.get("provider", ""), - connected_at=c.get("connected_at"), - is_active=c.get("is_active", True), - last_sync=c.get("last_sync"), + connected_at=c.get("created_at"), + is_active=c.get("status") == "active", + last_sync=c.get("last_synced_at"), ) for c in connections_data ] @@ -318,7 +318,7 @@ async def get_sleep_sessions( end_date=query_params.end_date, limit=query_params.limit, ) - + sessions = [ SleepSession( id=s.get("id"),