mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-06 15:04:52 +00:00
15 lines
305 B
Ruby
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
|