Files
danbooru/app/controllers/iqdb_queries_controller.rb
2020-06-14 01:06:51 -05:00

14 lines
482 B
Ruby

class IqdbQueriesController < ApplicationController
respond_to :html, :json, :xml, :js
def show
# XXX allow bare search params for backwards compatibility.
search_params.merge!(params.slice(:url, :image_url, :file_url, :post_id, :limit, :similarity, :high_similarity).permit!)
@high_similarity_matches, @low_similarity_matches, @matches = IqdbProxy.new.search(search_params)
respond_with(@matches, template: "iqdb_queries/show")
end
alias create show
end