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.

11 lines
251 B

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