|
|
@ -11,7 +11,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
|
|
|
|
|
|
|
|
|
|
|
attributes :domain, :title, :version, :source_url, :description,
|
|
|
|
attributes :domain, :title, :version, :source_url, :description,
|
|
|
|
:usage, :thumbnail, :languages, :configuration,
|
|
|
|
:usage, :thumbnail, :languages, :configuration,
|
|
|
|
:registrations
|
|
|
|
:registrations, :api_versions
|
|
|
|
|
|
|
|
|
|
|
|
has_one :contact, serializer: ContactSerializer
|
|
|
|
has_one :contact, serializer: ContactSerializer
|
|
|
|
has_many :rules, serializer: REST::RuleSerializer
|
|
|
|
has_many :rules, serializer: REST::RuleSerializer
|
|
|
@ -94,6 +94,12 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def api_versions
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
mastodon: 1,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
|
|
def registrations_enabled?
|
|
|
|
def registrations_enabled?
|
|
|
|