blob: 319401a2e2c5c4be9a1d74a0b025b8048dbaefa0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
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
|