Add api_versions
to /api/v2/instance
(#31354)
This commit is contained in:
parent
d67e11733e
commit
19a1acb38b
2 changed files with 17 additions and 1 deletions
|
@ -11,7 +11,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
|||
|
||||
attributes :domain, :title, :version, :source_url, :description,
|
||||
:usage, :thumbnail, :languages, :configuration,
|
||||
:registrations
|
||||
:registrations, :api_versions
|
||||
|
||||
has_one :contact, serializer: ContactSerializer
|
||||
has_many :rules, serializer: REST::RuleSerializer
|
||||
|
@ -94,6 +94,12 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
|||
}
|
||||
end
|
||||
|
||||
def api_versions
|
||||
{
|
||||
mastodon: 1,
|
||||
}
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def registrations_enabled?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue