From 264fc77ad45db4fa757dcaabc76091d90b5b573f Mon Sep 17 00:00:00 2001 From: Richard Hallett Date: Wed, 29 Jan 2025 16:22:31 +0100 Subject: [PATCH] Remove csv format option for providers --- app/controllers/providers_controller.rb | 54 ------------------------- spec/requests/providers_spec.rb | 12 ------ 2 files changed, 66 deletions(-) diff --git a/app/controllers/providers_controller.rb b/app/controllers/providers_controller.rb index 51081eeb6..d240aac3d 100644 --- a/app/controllers/providers_controller.rb +++ b/app/controllers/providers_controller.rb @@ -147,60 +147,6 @@ def index ) end end - header = %w[ - accountName - fabricaAccountId - year - is_active - accountDescription - accountWebsite - region - country - logo_url - focusArea - organisation_type - accountType - generalContactEmail - groupEmail - technicalContactEmail - technicalContactGivenName - technicalContactFamilyName - secondaryTechnicalContactEmail - secondaryTechnicalContactGivenName - secondaryTechnicalContactFamilyName - serviceContactEmail - serviceContactGivenName - serviceContactFamilyName - secondaryServiceContactEmail - secondaryServiceContactGivenName - secondaryServiceContactFamilyName - votingContactEmail - votingContactGivenName - votingContactFamilyName - billingStreet - billingPostalCode - billingCity - department - billingOrganization - billingState - billingCountry - billingContactEmail - billingContactGivenName - billingontactFamilyName - secondaryBillingContactEmail - secondaryBillingContactGivenName - secondaryBillingContactFamilyName - twitter - ror_id - member_type - joined - created - updated - deleted_at - ] - format.csv do - render request.format.to_sym => response.records.to_a, header: header - end end rescue Elasticsearch::Transport::Transport::Errors::BadRequest => e Raven.capture_exception(e) diff --git a/spec/requests/providers_spec.rb b/spec/requests/providers_spec.rb index 5a0b445cc..34554d650 100644 --- a/spec/requests/providers_spec.rb +++ b/spec/requests/providers_spec.rb @@ -142,18 +142,6 @@ ) end end - - context "text/csv" do - it "returns status code 200" do - get "/providers/", - nil, - { - "HTTP_ACCEPT" => "text/csv", "Authorization" => "Bearer " + token - } - - expect(last_response.status).to eq(200) - end - end end describe "GET /providers/:id with contacts" do