1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-22 06:39:39 +02:00
Maybe/app/controllers/securities_controller.rb
Zach Gollwitzer fa0248056d
Show UI warning to user when they need provider data but have not setup Synth yet (#1926)
* Simplify provider concerns

* Update tests

* Add UI warning for missing Synth key if family requires external data
2025-02-28 11:35:10 -05:00

11 lines
313 B
Ruby

class SecuritiesController < ApplicationController
def index
query = params[:q]
return render json: [] if query.blank? || query.length < 2 || query.length > 100
@securities = Security.search_provider({
search: query,
country: params[:country_code] == "US" ? "US" : nil
})
end
end