Skip to content

Commit

Permalink
Update app/controllers/cbv_flows_controller.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Tom Dooner <[email protected]>
  • Loading branch information
allthesignals and tdooner authored May 14, 2024
1 parent ab5c530 commit 3c24490
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/controllers/cbv_flows_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ def fetch_and_store_argyle_token
end

def fetch_employers(query = '')
res = Net::HTTP.get(URI.parse("#{ITEMS_ENDPOINT}?mapping_status=verified,mapped&q=#{query}"), {"Authorization" => "Basic #{Rails.application.credentials.argyle[:api_key]}"})
request_params = URI.encode_www_form(
mapping_status: 'verified,mapped',
q: query
)
res = Net::HTTP.get(URI(ITEMS_ENDPOINT).tap { |u| u.query = request_params }), {"Authorization" => "Basic #{Rails.application.credentials.argyle[:api_key]}"})
parsed = JSON.parse(res)

parsed['results']
Expand Down

0 comments on commit 3c24490

Please sign in to comment.