Skip to content

Commit

Permalink
Merge pull request #4057 from alphagov/remove-obsolete-code
Browse files Browse the repository at this point in the history
Remove code that handled old-style (array) api data from imminence.
  • Loading branch information
KludgeKML committed May 13, 2024
2 parents 92d4e5f + f6b23a4 commit e94904c
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions app/controllers/place_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,7 @@ def imminence_response_from_data(postcode, imminence_response, error)
places = []
addresses = []

# Temporary: allow both old and new imminence responses so that
# we can switch over seamlessly by deploying Frontend first

if !imminence_data.respond_to?(:key)
# Handle old-style returned array
# Remove this branch and temporary comment above when Imminence is switched over
places = imminence_data
elsif imminence_data["status"] == "ok"
if imminence_data["status"] == "ok"
places = imminence_data["places"]
else
addresses = imminence_data["addresses"]
Expand Down

0 comments on commit e94904c

Please sign in to comment.