Skip to content
Snippets Groups Projects
Commit 61de4a8f authored by Rivers, Travis (Contractor) Creighton's avatar Rivers, Travis (Contractor) Creighton Committed by Jeremy M Fee
Browse files

fix elements

parent 0592b36c
No related branches found
No related tags found
2 merge requests!146Release CMO metadata to production,!51Refactor elements endpoint and update FRT to FDT
......@@ -171,7 +171,7 @@ OBSERVATORIES = [
declination_base=209690,
),
Observatory(
id="FRT",
id="FDT",
elevation=69,
latitude=38.205,
longitude=282.627,
......
......@@ -10,15 +10,18 @@ router = APIRouter()
@router.get("/elements/")
def get_elements() -> Dict:
return {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": e.id,
"properties": {"name": e.name, "units": e.units},
"geometry": None,
}
for e in ELEMENTS
],
}
features = []
for e in ELEMENTS:
feature = {
"type": "Feature",
"id": e.id,
"properties": {
"name": e.name,
"units": e.units,
},
"geometry": None,
}
if e.abbreviation:
feature["properties"]["abbreviation"] = e.abbreviation
features.append(feature)
return {"type": "FeatureCollection", "features": features}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment