Removed unused code from initial_state and ReactController
• Removed: - unused code from initial_state and ReactController
This commit is contained in:
@@ -13,14 +13,9 @@ class InitialStateSerializer < ActiveModel::Serializer
|
||||
access_token: object.token,
|
||||
locale: I18n.locale,
|
||||
domain: Rails.configuration.x.local_domain,
|
||||
admin: object.admin&.id&.to_s,
|
||||
search_enabled: Chewy.enabled?,
|
||||
repository: GabSocial::Version.repository,
|
||||
source_url: GabSocial::Version.source_url,
|
||||
version: GabSocial::Version.to_s,
|
||||
invites_enabled: Setting.min_invite_role == 'user',
|
||||
mascot: instance_presenter.mascot&.file&.url,
|
||||
profile_directory: Setting.profile_directory,
|
||||
}
|
||||
|
||||
if object.current_account
|
||||
@@ -63,7 +58,6 @@ class InitialStateSerializer < ActiveModel::Serializer
|
||||
def accounts
|
||||
store = {}
|
||||
store[object.current_account.id.to_s] = ActiveModelSerializers::SerializableResource.new(object.current_account, serializer: REST::AccountSerializer) if object.current_account
|
||||
store[object.admin.id.to_s] = ActiveModelSerializers::SerializableResource.new(object.admin, serializer: REST::AccountSerializer) if object.admin
|
||||
store
|
||||
end
|
||||
|
||||
|
||||
@@ -10,15 +10,15 @@ class ManifestSerializer < ActiveModel::Serializer
|
||||
:share_target
|
||||
|
||||
def name
|
||||
object.site_title
|
||||
'Gab Social'
|
||||
end
|
||||
|
||||
def short_name
|
||||
object.site_title
|
||||
'Gab Social'
|
||||
end
|
||||
|
||||
def description
|
||||
strip_tags(object.site_short_description.presence || I18n.t('about.about_gabsocial_html'))
|
||||
'Gab is a social network that champions free speech, individual liberty and the free flow of information online. All are welcome.'
|
||||
end
|
||||
|
||||
def icons
|
||||
|
||||
@@ -16,7 +16,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
||||
end
|
||||
|
||||
def title
|
||||
Setting.site_title
|
||||
Setting::SITE_TITLE
|
||||
end
|
||||
|
||||
def description
|
||||
|
||||
Reference in New Issue
Block a user