diff options
Diffstat (limited to 'app/serializers/rest')
-rw-r--r-- | app/serializers/rest/instance_serializer.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/serializers/rest/instance_serializer.rb b/app/serializers/rest/instance_serializer.rb index 65907dad2..cab05e60a 100644 --- a/app/serializers/rest/instance_serializer.rb +++ b/app/serializers/rest/instance_serializer.rb @@ -4,7 +4,12 @@ class REST::InstanceSerializer < ActiveModel::Serializer include RoutingHelper attributes :uri, :title, :description, :email, - :version, :urls, :stats, :thumbnail, :max_toot_chars + :version, :urls, :stats, :thumbnail, :max_toot_chars, + :languages + + has_one :contact_account, serializer: REST::AccountSerializer + + delegate :contact_account, to: :instance_presenter def uri Rails.configuration.x.local_domain @@ -46,6 +51,10 @@ class REST::InstanceSerializer < ActiveModel::Serializer { streaming_api: Rails.configuration.x.streaming_api_base_url } end + def languages + [I18n.default_locale] + end + private def instance_presenter |