You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
438 B

  1. # frozen_string_literal: true
  2. class Api::V1::Accounts::LookupController < Api::BaseController
  3. before_action -> { authorize_if_got_token! :read, :'read:accounts' }
  4. before_action :set_account
  5. def show
  6. render json: @account, serializer: REST::AccountSerializer
  7. end
  8. private
  9. def set_account
  10. @account = ResolveAccountService.new.call(params[:acct], skip_webfinger: true) || raise(ActiveRecord::RecordNotFound)
  11. end
  12. end