diff options
author | beatrix <beatrix.bitrot@gmail.com> | 2018-03-03 13:40:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-03 13:40:00 -0500 |
commit | 43a9a781a443a6b9296431fbcc4285b3ca6a1a57 (patch) | |
tree | d4bf067aeedcebbdc3d160eca6aa1a7c7d1bfa00 /app/serializers/rest/instance_serializer.rb | |
parent | ee00da01d2e4cc455b92f1f4a7c9142c73048433 (diff) | |
parent | 65e2a4645e086110072efed5b3d4d1434c933e04 (diff) |
Merge pull request #377 from glitch-soc/merge-upstream
hhhhhhhhhnnnnnnnnnnnghh!!!!!
Diffstat (limited to 'app/serializers/rest/instance_serializer.rb')
-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..0168b18ea 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 + [ENV.fetch('DEFAULT_LOCALE', I18n.default_locale)] + end + private def instance_presenter |