1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-25 07:37:16 +09:00
YuruToot/app/controllers/api/accounts/lookup_controller.rb
2016-03-21 17:33:04 +01:00

15 lines
305 B
Ruby

class Api::Accounts::LookupController < ApiController
before_action :doorkeeper_authorize!
respond_to :json
def index
@accounts = Account.where(domain: nil).where(username: lookup_params)
end
private
def lookup_params
(params[:usernames] || '').split(',').map(&:strip)
end
end