/iqdb_queries: support both GET and POST; add GET /posts/1/similar.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
class IqdbQueriesController < ApplicationController
|
||||
before_filter :member_only
|
||||
|
||||
def create
|
||||
def index
|
||||
if !Danbooru.config.iqdbs_server
|
||||
raise NotImplementedError.new("the IQDBs service isn't configured. Similarity searches are not available.")
|
||||
end
|
||||
@@ -16,6 +16,9 @@ class IqdbQueriesController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# Support both POST /iqdb_queries and GET /iqdb_queries.
|
||||
alias_method :create, :index
|
||||
|
||||
protected
|
||||
def create_by_url
|
||||
@download = Iqdb::Download.new(params[:url])
|
||||
|
||||
Reference in New Issue
Block a user