diff options
author | Alex Gessner <alex.gessner@gmail.com> | 2019-03-28 13:01:09 -0400 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-03-28 18:01:09 +0100 |
commit | 69141dca26f8a28d3aff63387b1c8d2bba7fdfa3 (patch) | |
tree | 258b59ecbce99855bccb4fd679a5eb3d9938acb0 /app/controllers/api/v1/accounts | |
parent | 026dd75208223a8ceb8f3e82699a123d68b9a1c7 (diff) |
squashed identity proof updates (#10375)
Diffstat (limited to 'app/controllers/api/v1/accounts')
-rw-r--r-- | app/controllers/api/v1/accounts/identity_proofs_controller.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/controllers/api/v1/accounts/identity_proofs_controller.rb b/app/controllers/api/v1/accounts/identity_proofs_controller.rb new file mode 100644 index 000000000..bea51ae11 --- /dev/null +++ b/app/controllers/api/v1/accounts/identity_proofs_controller.rb @@ -0,0 +1,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 |