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

Strip .json extension from URLs returned from API endpoints #998

Merged
merged 1 commit into from
Jul 18, 2024
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
2 changes: 1 addition & 1 deletion app/views/collections/index.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
json.array!(@collections) do |collection|
json.extract! collection, :id, :title, :description, :image_url
json.url collection_url(collection, format: :json)
json.url collection_url(collection)
end
2 changes: 1 addition & 1 deletion app/views/content_providers/index.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
json.array!(@content_providers) do |content_provider|
json.extract! content_provider, :id, :id, :title, :image_url, :description,
:url, :created_at, :updated_at, :contact
json.url content_provider_url(content_provider, format: :json)
json.url content_provider_url(content_provider)
end
2 changes: 1 addition & 1 deletion app/views/learning_path_topics/index.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
json.array!(@learning_path_topics) do |learning_path_topic|
json.extract! learning_path_topic, :id, :title, :description
json.url learning_path_topic_url(learning_path_topic, format: :json)
json.url learning_path_topic_url(learning_path_topic)
end
2 changes: 1 addition & 1 deletion app/views/materials/index.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
json.array!(@materials) do |material|
json.extract! material, :id, :title, :url, :description, :doi, :remote_updated_date, :remote_created_date
json.url material_url(material, format: :json)
json.url material_url(material)

json.partial! 'common/ontology_terms', type: 'scientific_topics', resource: material
json.partial! 'common/ontology_terms', type: 'operations', resource: material
Expand Down
2 changes: 1 addition & 1 deletion app/views/nodes/index.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
json.array!(@nodes) do |node|
json.extract! node, :id, :title, :description, :image_url, :events, :materials, :created_at, :updated_at
json.url node_url(node, format: :json)
json.url node_url(node)
end
2 changes: 1 addition & 1 deletion app/views/sources/index.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
json.array!(@sources) do |source|
json.extract! source, :content_provider, :created_at, :url,
:method, :enabled
json.url source_url(source, format: :json)
json.url source_url(source)
end
2 changes: 1 addition & 1 deletion app/views/users/_list.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
json.array!(users) do |user|
json.extract! user, :id, :username
json.extract! user.profile, :firstname, :surname if user.profile
json.url user_url(user, format: :json)
json.url user_url(user)
end
2 changes: 1 addition & 1 deletion app/views/workflows/index.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
json.array!(@workflows) do |workflow|
json.extract! workflow, :id, :title, :description, :user_id, :workflow_content
json.url workflow_url(workflow, format: :json)
json.url workflow_url(workflow)

json.partial! 'common/ontology_terms', type: 'scientific_topics', resource: workflow
end
Loading