The code powering m.abunchtell.com https://m.abunchtell.com
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

31 lignes
506 B

  1. # frozen_string_literal: true
  2. class REST::InstanceSerializer < ActiveModel::Serializer
  3. attributes :uri, :title, :description, :email,
  4. :version, :urls
  5. def uri
  6. Rails.configuration.x.local_domain
  7. end
  8. def title
  9. Setting.site_title
  10. end
  11. def description
  12. Setting.site_description
  13. end
  14. def email
  15. Setting.site_contact_email
  16. end
  17. def version
  18. Mastodon::Version.to_s
  19. end
  20. def urls
  21. { streaming_api: Rails.configuration.x.streaming_api_base_url }
  22. end
  23. end