Skip to content

Commit

Permalink
OpenCode Issue 13: Correct handling of search requests without search…
Browse files Browse the repository at this point in the history
… query parameter.
  • Loading branch information
pschijven committed Jun 19, 2024
1 parent aec1b43 commit 4c5d38d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/controllers/search_results_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def index

@remote_result_collections = []

if params[:query]
if params[:query].present?
# Deal with language parameter patterns
languages = []
# Either "l[]=de&l[]=en" as well as "l=de,en" should be possible
Expand Down Expand Up @@ -142,6 +142,15 @@ def index
}
format.any(:ttl, :rdf, :nt)
end
else
respond_to do |format|
format.html do
render :index
end
format.any(:ttl) do

This comment has been minimized.

Copy link
@mjansing

mjansing Jun 20, 2024

Contributor

I think we should respond to :nt and :rdf as well.

This comment has been minimized.

Copy link
@pschijven

pschijven Jun 21, 2024

Author Contributor

Thanks for finding out! I'll correct it

head :bad_request
end
end
end
end

Expand Down

0 comments on commit 4c5d38d

Please sign in to comment.