mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-15 20:54:01 -05:00
22 lines
411 B
Ruby
22 lines
411 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Api::ProofsController < Api::BaseController
|
|
include AccountOwnedConcern
|
|
|
|
before_action :set_provider
|
|
|
|
def index
|
|
render json: @account, serializer: @provider.serializer_class
|
|
end
|
|
|
|
private
|
|
|
|
def set_provider
|
|
@provider = ProofProvider.find(params[:provider]) || raise(ActiveRecord::RecordNotFound)
|
|
end
|
|
|
|
def username_param
|
|
params[:username]
|
|
end
|
|
end
|