You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
metu.life/app/serializers/rest/instance_serializer.rb

30 lines
506 B

# frozen_string_literal: true
class REST::InstanceSerializer < ActiveModel::Serializer
attributes :uri, :title, :description, :email,
:version, :urls
def uri
Rails.configuration.x.local_domain
end
def title
Setting.site_title
end
def description
Setting.site_description
end
def email
Setting.site_contact_email
end
def version
Mastodon::Version.to_s
end
def urls
{ streaming_api: Rails.configuration.x.streaming_api_base_url }
end
end