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:
@@ -158,7 +158,7 @@ webroot: Path | None = None # nginx webroot — when set, trigger full rebuil
|
||||
strava_client_id: str = ""
|
||||
strava_client_secret: str = ""
|
||||
public_url: str = "" # e.g. "https://yourdomain.com" — used for OAuth redirect URIs
|
||||
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
|
||||
_db = None # sqlite3.Connection, opened lazily
|
||||
|
||||
|
||||
@@ -1279,11 +1279,7 @@ async def recalculate_elevation_endpoint(
|
||||
user = _require_user(bincio_session)
|
||||
_check_id(activity_id)
|
||||
if not dem_url:
|
||||
raise HTTPException(
|
||||
503,
|
||||
"DEM URL not configured. "
|
||||
"Pass --dem-url <api-url> to bincio serve (e.g. https://api.open-elevation.com).",
|
||||
)
|
||||
raise HTTPException(503, "DEM URL not configured.")
|
||||
dd = _get_data_dir() / user.handle
|
||||
if not (dd / "activities" / f"{activity_id}.json").exists():
|
||||
raise HTTPException(404, "Activity not found")
|
||||
|
||||
Reference in New Issue
Block a user