about summary refs log tree commit diff
path: root/app/controllers/api/proofs_controller.rb
blob: dd32cd577bfceaaba93f6387274f9d957be39818 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

class Api::ProofsController < Api::BaseController
  include AccountOwnedConcern

  skip_before_action :require_authenticated_user!

  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