diff --git a/app/controllers/clients_controller.rb b/app/controllers/clients_controller.rb index fb932d237..3ec113690 100644 --- a/app/controllers/clients_controller.rb +++ b/app/controllers/clients_controller.rb @@ -132,7 +132,7 @@ def totals page_prov = { size: 2000, number: 1 } ttl = Client.query("", page: page_prov).map do |client| - response = Doi.query("", client_id: client.symbol.downcase, page: page) + response = Doi.query("", client_id: client.symbol.downcase, state: params[:state] || "",page: page) total = response.results.total states = total > 0 ? facet_by_key(response.response.aggregations.states.buckets) : nil temporal ={} diff --git a/app/controllers/providers_controller.rb b/app/controllers/providers_controller.rb index 928e315af..d8d7c89ad 100644 --- a/app/controllers/providers_controller.rb +++ b/app/controllers/providers_controller.rb @@ -125,7 +125,7 @@ def totals page_prov = { size: 500, number: 1} ttl = Provider.query("", page: page_prov).map do |provider| - response = Doi.query("", provider_id: provider.symbol.downcase, page: page) + response = Doi.query("", provider_id: provider.symbol.downcase, state: params[:state] || "", page: page) total = response.results.total states = total > 0 ? facet_by_key(response.response.aggregations.states.buckets) : nil temporal ={}