HRV baseline band from Garmin + dashboard HRV colours + route name on recent activities + sync-now race fix
Build and push images / validate (push) Successful in 7s
Build and push images / build-backend (push) Successful in 1m9s
Build and push images / build-worker (push) Successful in 5s
Build and push images / build-frontend (push) Successful in 10s

This commit is contained in:
2026-06-16 00:13:16 +01:00
parent e7123ee5db
commit d01f66223b
10 changed files with 98 additions and 45 deletions
+4 -2
View File
@@ -1,6 +1,7 @@
from fastapi import APIRouter, Depends, HTTPException, Query
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy import select, func, desc, delete
from sqlalchemy.orm import selectinload
from pydantic import BaseModel
from typing import Optional, List
from datetime import datetime
@@ -28,6 +29,7 @@ class ActivitySummary(BaseModel):
bounding_box: Optional[dict]
hr_zones: Optional[dict]
named_route_id: Optional[int]
named_route_name: Optional[str] = None
class Config:
from_attributes = True
@@ -110,7 +112,7 @@ async def list_activities(
db: AsyncSession = Depends(get_db),
current_user: User = Depends(get_current_user),
):
q = select(Activity).where(Activity.user_id == current_user.id)
q = select(Activity).options(selectinload(Activity.named_route)).where(Activity.user_id == current_user.id)
if sport_type:
q = q.where(Activity.sport_type == sport_type)
@@ -133,7 +135,7 @@ async def get_activity(
current_user: User = Depends(get_current_user),
):
result = await db.execute(
select(Activity).where(
select(Activity).options(selectinload(Activity.named_route)).where(
Activity.id == activity_id,
Activity.user_id == current_user.id,
)