mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-18 20:59:39 +02:00
Fix ticker filling when Synth is connected (#1950)
This commit is contained in:
parent
0544089710
commit
cf59fe45e7
2 changed files with 3 additions and 4 deletions
|
@ -1,10 +1,7 @@
|
||||||
class SecuritiesController < ApplicationController
|
class SecuritiesController < ApplicationController
|
||||||
def index
|
def index
|
||||||
query = params[:q]
|
|
||||||
return render json: [] if query.blank? || query.length < 2 || query.length > 100
|
|
||||||
|
|
||||||
@securities = Security.search_provider({
|
@securities = Security.search_provider({
|
||||||
search: query,
|
search: params[:q],
|
||||||
country: params[:country_code] == "US" ? "US" : nil
|
country: params[:country_code] == "US" ? "US" : nil
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,6 +9,8 @@ module Security::Provided
|
||||||
end
|
end
|
||||||
|
|
||||||
def search_provider(query)
|
def search_provider(query)
|
||||||
|
return [] if query[:search].blank? || query[:search].length < 2
|
||||||
|
|
||||||
response = provider.search_securities(
|
response = provider.search_securities(
|
||||||
query: query[:search],
|
query: query[:search],
|
||||||
dataset: "limited",
|
dataset: "limited",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue