Browse Source

f

CLDC-2019-UPRN-search
Jack S 2 years ago
parent
commit
2fce5c5dad
  1. 2
      app/models/form/lettings/questions/uprn.rb

2
app/models/form/lettings/questions/uprn.rb

@ -20,7 +20,7 @@ class Form::Lettings::Questions::Uprn < ::Form::Question
return [] unless q return [] unless q
# TODO: handle non-200 responses # TODO: handle non-200 responses
resp = HTTParty.get("https://api.os.uk/search/places/v1/find?query=#{q}&key=#{ENV['OS_DATA_KEY']}&minmatch=0.8&maxresults=50") resp = HTTParty.get("https://api.os.uk/search/places/v1/find?query=#{q}&key=#{ENV['OS_DATA_KEY']}&minmatch=0.4")
opts = {} opts = {}
resp["results"]&.each do |result| resp["results"]&.each do |result|

Loading…
Cancel
Save