Kaynağa Gözat

Add `openRegistrations` attribute to nodeinfo endpoint (#12058)

master^2
Eugen Rochko 4 yıl önce
committed by GitHub
ebeveyn
işleme
4e1afef6f9
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: 4AEE18F83AFDEB23
1 değiştirilmiş dosya ile 5 ekleme ve 1 silme
  1. +5
    -1
      app/serializers/nodeinfo/serializer.rb

+ 5
- 1
app/serializers/nodeinfo/serializer.rb Dosyayı Görüntüle

@@ -3,7 +3,7 @@
class NodeInfo::Serializer < ActiveModel::Serializer
include RoutingHelper

attributes :version, :software, :protocols, :usage
attributes :version, :software, :protocols, :usage, :open_registrations

def version
'2.0'
@@ -33,6 +33,10 @@ class NodeInfo::Serializer < ActiveModel::Serializer
}
end

def open_registrations
Setting.registrations_mode != 'none' && !Rails.configuration.x.single_user_mode
end

private

def instance_presenter


Yükleniyor…
İptal
Kaydet