1
0

application_serializer.rb 430 B

1234567891011121314151617181920212223242526
  1. # frozen_string_literal: true
  2. class REST::ApplicationSerializer < ActiveModel::Serializer
  3. attributes :id, :name, :website, :redirect_uri,
  4. :client_id, :client_secret, :vapid_key
  5. def id
  6. object.id.to_s
  7. end
  8. def client_id
  9. object.uid
  10. end
  11. def client_secret
  12. object.secret
  13. end
  14. def website
  15. object.website.presence
  16. end
  17. def vapid_key
  18. Rails.configuration.x.vapid_public_key
  19. end
  20. end