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

class Api::V1::Accounts::IdentityProofsController < Api::BaseController
  before_action :require_user!
  before_action :set_account

  respond_to :json

  def index
    @proofs = @account.identity_proofs.active
    render json: @proofs, each_serializer: REST::IdentityProofSerializer
  end

  private

  def set_account
    @account = Account.find(params[:account_id])
  end
end