feat: implement Fitbit OAuth, Garmin MFA, and optimize segment discovery
- Add Fitbit authentication flow (save credentials, OAuth callback handling) - Implement Garmin MFA support with successful session/cookie handling - Optimize segment discovery with new sampling and activity query services - Refactor database session management in discovery API for better testability - Enhance activity data parsing for charts and analysis - Update tests to use testcontainers and proper dependency injection - Clean up repository by ignoring and removing tracked transient files (.pyc, .db)
This commit is contained in:
@@ -19,6 +19,7 @@ from fitbit import exceptions
|
||||
from ..models.weight_record import WeightRecord
|
||||
from ..models.config import Configuration
|
||||
from enum import Enum
|
||||
from .status import get_db
|
||||
|
||||
router = APIRouter()
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -59,11 +60,6 @@ class JobStatusResponse(BaseModel):
|
||||
message: str
|
||||
cancel_requested: bool
|
||||
|
||||
def get_db():
|
||||
db_manager = PostgreSQLManager(config.DATABASE_URL)
|
||||
with db_manager.get_db_session() as session:
|
||||
yield session
|
||||
|
||||
from ..services.garth_helper import load_and_verify_garth_session
|
||||
from ..tasks.definitions import (
|
||||
run_activity_sync_task,
|
||||
|
||||
Reference in New Issue
Block a user