about summary refs log tree commit diff
path: root/app/controllers/api/accounts/lookup_controller.rb
blob: dc8bcb1322823d8e59a53b8b3c912ed134f59c4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
class Api::Accounts::LookupController < ApplicationController
  def index
    @accounts = Account.where(domain: nil).where(username: lookup_params)
  end

  private

  def lookup_params
    (params[:usernames] || '').split(',').map(&:strip)
  end
end