generated from Grigo/AndroidTemplate
added linear slider
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user