2016-03-22 01:33:04 +09:00
|
|
|
class Api::Accounts::LookupController < ApiController
|
|
|
|
before_action :doorkeeper_authorize!
|
|
|
|
respond_to :json
|
|
|
|
|
2016-03-22 01:02:16 +09:00
|
|
|
def index
|
|
|
|
@accounts = Account.where(domain: nil).where(username: lookup_params)
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def lookup_params
|
|
|
|
(params[:usernames] || '').split(',').map(&:strip)
|
|
|
|
end
|
|
|
|
end
|