This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2016-03-21 09:33:04 -07:00
|
|
|
class Api::Accounts::LookupController < ApiController
|
|
|
|
before_action :doorkeeper_authorize!
|
|
|
|
respond_to :json
|
|
|
|
|
2016-03-21 09:02:16 -07:00
|
|
|
def index
|
|
|
|
@accounts = Account.where(domain: nil).where(username: lookup_params)
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def lookup_params
|
|
|
|
(params[:usernames] || '').split(',').map(&:strip)
|
|
|
|
end
|
|
|
|
end
|