|
|
|
@ -5,7 +5,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer |
|
|
|
|
|
|
|
|
|
attributes :uri, :title, :description, :email, |
|
|
|
|
:version, :urls, :stats, :thumbnail, |
|
|
|
|
:languages |
|
|
|
|
:languages, :registrations |
|
|
|
|
|
|
|
|
|
has_one :contact_account, serializer: REST::AccountSerializer |
|
|
|
|
|
|
|
|
@ -51,6 +51,10 @@ class REST::InstanceSerializer < ActiveModel::Serializer |
|
|
|
|
[I18n.default_locale] |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def registrations |
|
|
|
|
Setting.open_registrations && !Rails.configuration.x.single_user_mode |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
private |
|
|
|
|
|
|
|
|
|
def instance_presenter |
|
|
|
|