about summary refs log tree commit diff
path: root/app/controllers/api/v1/accounts/identity_proofs_controller.rb
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-03-30 23:42:55 -0700
committerReverite <github@reverite.sh>2019-03-30 23:42:55 -0700
commit4d77314005483e53e320a82c87805c6bcca1c463 (patch)
tree99f5b05bcbb1e8278517bf9a8f9ab114ab2dec45 /app/controllers/api/v1/accounts/identity_proofs_controller.rb
parente356a902d23a0ed87c62717085a37d34550c8464 (diff)
parent925830d11bb5c132e282f82bdb2ca893d87c9c24 (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'app/controllers/api/v1/accounts/identity_proofs_controller.rb')
-rw-r--r--app/controllers/api/v1/accounts/identity_proofs_controller.rb19
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