diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-08 20:36:01 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-08 20:36:01 +0200 |
commit | 85d89b472dff2c3d06801dbd42f91c325d21a434 (patch) | |
tree | b348297bf48c63f906cdcdbc1ff573203afb560a /app/controllers/api/accounts/lookup_controller.rb | |
parent | a4cc966476852542f445793b60c67ad3682976e5 (diff) |
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
Diffstat (limited to 'app/controllers/api/accounts/lookup_controller.rb')
-rw-r--r-- | app/controllers/api/accounts/lookup_controller.rb | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/app/controllers/api/accounts/lookup_controller.rb b/app/controllers/api/accounts/lookup_controller.rb deleted file mode 100644 index 319401a2e..000000000 --- a/app/controllers/api/accounts/lookup_controller.rb +++ /dev/null @@ -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 |