Optimized n+1 queries in accounts Atom and HTML views

Added stack trace for SQL queries in development
Removed badly thought out accounts/lookup API
This commit is contained in:
Eugen Rochko
2016-09-08 20:36:01 +02:00
parent a4cc966476
commit 85d89b472d
13 changed files with 44 additions and 68 deletions

View File

@ -1,14 +0,0 @@
class Api::Accounts::LookupController < ApiController
before_action :doorkeeper_authorize!
respond_to :json
def index
@accounts = Account.where(domain: nil).where(username: lookup_params)
end
private
def lookup_params
(params[:usernames] || '').split(',').map(&:strip)
end
end