Skip to content

Commit

Permalink
Merge pull request #1320 from datacite/remove_csv_providers
Browse files Browse the repository at this point in the history
Remove csv format option for providers
  • Loading branch information
richardhallett authored Jan 29, 2025
2 parents bca26d3 + 264fc77 commit 0e9ff2b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 66 deletions.
54 changes: 0 additions & 54 deletions app/controllers/providers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 0 additions & 12 deletions spec/requests/providers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0e9ff2b

Please sign in to comment.