1
0

application_serializer.rb 473 B

1234567891011121314151617181920212223
  1. # frozen_string_literal: true
  2. class REST::ApplicationSerializer < ActiveModel::Serializer
  3. attributes :id, :name, :website, :scopes, :redirect_uris
  4. # NOTE: Deprecated in 4.3.0, needs to be removed in 5.0.0
  5. attribute :vapid_key
  6. # We should consider this property deprecated for 4.3.0
  7. attribute :redirect_uri
  8. def id
  9. object.id.to_s
  10. end
  11. def website
  12. object.website.presence
  13. end
  14. def vapid_key
  15. Rails.configuration.x.vapid_public_key
  16. end
  17. end