added linear slider

This commit is contained in:
2026-06-15 07:50:41 +03:00
parent d28391c71f
commit ab2a3bb035
7 changed files with 239 additions and 16 deletions
+2 -1
View File
@@ -307,6 +307,7 @@ class ElevationPoint(BaseModel):
class ElevationProfileBody(BaseModel):
points: list[ElevationPoint] = Field(default_factory=list)
step_m: float = 10.0
target_points: Optional[int] = Field(None, ge=2, le=500)
@app.post("/api/elevation/profile")
@@ -314,7 +315,7 @@ def elevation_profile(body: ElevationProfileBody):
from core.elevation import build_elevation_profile
pts = [p.model_dump(exclude_none=True) for p in body.points]
return build_elevation_profile(pts, body.step_m)
return build_elevation_profile(pts, body.step_m, body.target_points)
@app.get("/api/tracks/{track_id}/elevation-profile")