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

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

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

  private

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