Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove csv format option for providers #1320

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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