activitypub-academy/app/controllers/api/accounts/lookup_controller.rb

12 lines
251 B
Ruby
Raw Normal View History

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