Skip to content

Commit

Permalink
clean up debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
gislawill committed Jan 30, 2025
1 parent 9ee7907 commit 7ab21e1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 30 deletions.
22 changes: 0 additions & 22 deletions api/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,25 +499,3 @@ def get_google_floods_inundations_api(
iso2_codes = [region_code.upper() for region_code in region_codes]

return get_google_floods_inundations(iso2_codes, run_sequentially)


@app.get("/google-floods/inundations-2")
def get_google_floods_inundations_api_2(
region_codes: list[str] = Query(...), run_sequentially: bool = Query(default=False)
):
"""Get statistical charts data"""
if not region_codes:
raise HTTPException(
status_code=400,
detail="At least one region code must be provided.",
)
for region_code in region_codes:
if len(region_code) != 2:
raise HTTPException(
status_code=400,
detail=f"Region code '{region_code}' must be exactly two characters (iso2).",
)

iso2_codes = [region_code.upper() for region_code in region_codes]

return get_google_floods_inundations(iso2_codes, run_sequentially)
2 changes: 1 addition & 1 deletion frontend/src/config/mozambique/layers.json
Original file line number Diff line number Diff line change
Expand Up @@ -3184,7 +3184,7 @@
"title": "Flood Inundation Prediction Map",
"type": "geojson_polygon",
"hex_display": false,
"data": "https://prism-api.ovio.org/google-floods/inundations-2/?region_codes=MZ",
"data": "https://prism-api.ovio.org/google-floods/inundations?region_codes=MZ",
"data_field": "level",
"data_field_type": "text",
"opacity": 1,
Expand Down
7 changes: 0 additions & 7 deletions frontend/src/context/layers/geojson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@ export const fetchGeojsonLayerData: LazyLoader<GeojsonDataLayerProps> =
requestUrl,
dispatch,
{
mode: 'cors',
timeout: GEOJSON_REQUEST_TIMEOUT,
headers: {
Accept: 'application/json',
'Cache-Control': 'no-cache',
Pragma: 'no-cache',
},
redirect: 'follow',
},
`Request failed for fetching point layer data at ${requestUrl}`,
);
Expand Down

0 comments on commit 7ab21e1

Please sign in to comment.