From 3b8615acf6e614b64d4fa02e8587fb5261f13a8d Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Wed, 14 Nov 2018 20:40:33 +0100 Subject: [PATCH] optionally also query for deleted clients and providers. datacite/bracco#54 --- app/controllers/clients_controller.rb | 2 +- app/controllers/providers_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/clients_controller.rb b/app/controllers/clients_controller.rb index fbaf5eb8e..9256dd0d5 100644 --- a/app/controllers/clients_controller.rb +++ b/app/controllers/clients_controller.rb @@ -31,7 +31,7 @@ def index elsif params[:ids].present? response = Client.find_by_ids(params[:ids], page: page, sort: sort) else - response = Client.query(params[:query], year: params[:year], provider_id: params[:provider_id], fields: params[:fields], page: page, sort: sort) + response = Client.query(params[:query], year: params[:year], provider_id: params[:provider_id], include_deleted: params[:include_deleted], fields: params[:fields], page: page, sort: sort) end total = response.results.total diff --git a/app/controllers/providers_controller.rb b/app/controllers/providers_controller.rb index 39f33ace7..551a9fcee 100644 --- a/app/controllers/providers_controller.rb +++ b/app/controllers/providers_controller.rb @@ -30,7 +30,7 @@ def index elsif params[:ids].present? response = Provider.find_by_ids(params[:ids], page: page, sort: sort) else - response = Provider.query(params[:query], year: params[:year], region: params[:region], organization_type: params[:organization_type], focus_area: params[:focus_area], fields: params[:fields], page: page, sort: sort) + response = Provider.query(params[:query], year: params[:year], region: params[:region], organization_type: params[:organization_type], focus_area: params[:focus_area], include_deleted: params[:include_deleted], fields: params[:fields], page: page, sort: sort) end total = response.results.total