fix: default DEM URL to api.open-elevation.com

No configuration needed out of the box; --dem-url only required to
override the default with a self-hosted or alternative endpoint.
This commit is contained in:
Davide Scaini
2026-04-20 21:17:03 +02:00
parent 1940e2409b
commit 0c659db6cb
4 changed files with 8 additions and 20 deletions
+2 -6
View File
@@ -20,7 +20,7 @@ data_dir: Path | None = None
site_url: str = "http://localhost:4321"
strava_client_id: str = ""
strava_client_secret: str = ""
dem_url: str = "" # Open-Elevation-compatible API base URL; empty = feature disabled
dem_url: str = "https://api.open-elevation.com" # Open-Elevation-compatible API base URL
# In-memory CSRF state tokens for OAuth flows (token → True); cleared after use
_oauth_states: set[str] = set()
@@ -435,11 +435,7 @@ async def recalculate_elevation_endpoint(activity_id: str) -> JSONResponse:
Requires --dem-url to be set when starting bincio edit.
"""
if not dem_url:
raise HTTPException(
503,
"DEM URL not configured. "
"Pass --dem-url <api-url> to bincio edit (e.g. https://api.open-elevation.com).",
)
raise HTTPException(503, "DEM URL not configured.")
dd = _get_data_dir()
_check_id(activity_id)
try: