add details to newrelic trace, fix 401 errors for xml
This commit is contained in:
@@ -58,6 +58,10 @@ protected
|
||||
render :text => "authentication failed", :status => 401
|
||||
end
|
||||
|
||||
fmt.xml do
|
||||
render :xml => {:sucess => false, :reason => "authentication failed"}.to_xml(:root => "response"), :status => 401
|
||||
end
|
||||
|
||||
fmt.json do
|
||||
render :json => {:success => false, :reason => "authentication failed"}.to_json, :status => 401
|
||||
end
|
||||
|
||||
@@ -1034,7 +1034,7 @@ class Post < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def fast_count_search(tags, options = {})
|
||||
count = Post.with_timeout(options[:statement_timeout] || 500, Danbooru.config.blank_tag_search_fast_count || 1_000_000) do
|
||||
count = Post.with_timeout(options[:statement_timeout] || 500, Danbooru.config.blank_tag_search_fast_count || 1_000_000, :tags => tags) do
|
||||
Post.tag_match(tags).count
|
||||
end
|
||||
if count > 0
|
||||
|
||||
Reference in New Issue
Block a user