You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
305 B

  1. class Api::Accounts::LookupController < ApiController
  2. before_action :doorkeeper_authorize!
  3. respond_to :json
  4. def index
  5. @accounts = Account.where(domain: nil).where(username: lookup_params)
  6. end
  7. private
  8. def lookup_params
  9. (params[:usernames] || '').split(',').map(&:strip)
  10. end
  11. end