identity_proof_serializer.rb 336 B

1234567891011121314151617
  1. # frozen_string_literal: true
  2. class REST::IdentityProofSerializer < ActiveModel::Serializer
  3. attributes :provider, :provider_username, :updated_at, :proof_url, :profile_url
  4. def proof_url
  5. object.badge.proof_url
  6. end
  7. def profile_url
  8. object.badge.profile_url
  9. end
  10. def provider
  11. object.provider.capitalize
  12. end
  13. end