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:
parent
a4cc966476
commit
85d89b472d
13 changed files with 44 additions and 68 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue