about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorAlex Gessner <alex.gessner@gmail.com>2019-03-28 13:01:09 -0400
committerEugen Rochko <eugen@zeonfederated.com>2019-03-28 18:01:09 +0100
commit69141dca26f8a28d3aff63387b1c8d2bba7fdfa3 (patch)
tree258b59ecbce99855bccb4fd679a5eb3d9938acb0 /app/serializers
parent026dd75208223a8ceb8f3e82699a123d68b9a1c7 (diff)
squashed identity proof updates (#10375)
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/rest/identity_proof_serializer.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/serializers/rest/identity_proof_serializer.rb b/app/serializers/rest/identity_proof_serializer.rb
new file mode 100644
index 000000000..0e7415935
--- /dev/null
+++ b/app/serializers/rest/identity_proof_serializer.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class REST::IdentityProofSerializer < ActiveModel::Serializer
+  attributes :provider, :provider_username, :updated_at, :proof_url, :profile_url
+
+  def proof_url
+    object.badge.proof_url
+  end
+
+  def profile_url
+    object.badge.profile_url
+  end
+
+  def provider
+    object.provider.capitalize
+  end
+end