1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-10 07:55:21 +02:00

Fix ticker filling when Synth is connected

This commit is contained in:
Zach Gollwitzer 2025-03-05 09:24:17 -05:00
parent 0544089710
commit 89d4daee6a
2 changed files with 3 additions and 4 deletions

View file

@ -1,10 +1,7 @@
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,
search: params[:q],
country: params[:country_code] == "US" ? "US" : nil
})
end

View file

@ -9,6 +9,8 @@ module Security::Provided
end
def search_provider(query)
return [] if query[:search].blank? || query[:search].length < 2
response = provider.search_securities(
query: query[:search],
dataset: "limited",