Skip to content

Commit

Permalink
fix: merge conflict resolved with staging
Browse files Browse the repository at this point in the history
  • Loading branch information
hurshd0 committed Apr 26, 2020
2 parents 76b07da + 2857b8d commit 2136f00
Show file tree
Hide file tree
Showing 5 changed files with 266 additions and 263 deletions.
14 changes: 10 additions & 4 deletions api/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,14 +434,20 @@ def post_zip(zip_code: ZIPInput) -> JSONResponse:
try:
county = zip_info["county"].rsplit(" ", 1)[0]
state = zip_info["state"]
_logger.info(f"State: {state}, County: {county}")
city = zip_info["city"]
_logger.info(f"State: {state}, County: {county}, City: {city}")
if state == "NY":
nyc_counties = ["Bronx", "Kings", "Queens", "Richmond"]
if county in nyc_counties:
county = "New York"
data = read_county_stats(state, county)[0]
else:
data = read_county_stats(state, county)[0]
elif state == "VI":
if city == "St Thomas":
county = "St. Thomas"
if city == "St John":
county = "St. John"
if city in ["Christiansted", "Frederiksted", "Kingshill"]:
county = "St. Croix"
data = read_county_stats(state, county)[0]
json_data = {"success": True, "message": data}
del data
gc.collect()
Expand Down
Loading

0 comments on commit 2136f00

Please sign in to comment.