From 69141dca26f8a28d3aff63387b1c8d2bba7fdfa3 Mon Sep 17 00:00:00 2001 From: Alex Gessner Date: Thu, 28 Mar 2019 13:01:09 -0400 Subject: squashed identity proof updates (#10375) --- .../api/v1/accounts/identity_proofs_controller.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 app/controllers/api/v1/accounts/identity_proofs_controller.rb (limited to 'app/controllers/api/v1') 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 -- cgit