now strava sync works

This commit is contained in:
Davide Scaini
2026-03-30 14:39:56 +02:00
parent d806072546
commit 8fcd9f642b
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -126,8 +126,10 @@ class StravaClient:
"client_secret": self.client_secret,
"code": code,
"grant_type": "authorization_code",
"redirect_uri": f"http://localhost:{CALLBACK_PORT}/callback",
}, timeout=30)
r.raise_for_status()
if not r.ok:
raise RuntimeError(f"Token exchange failed ({r.status_code}): {r.text}")
self._tokens = r.json()
self._tokens["client_id"] = self.client_id
self._save_tokens()