about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-01-11 03:03:26 -0600
committermultiple creatures <dev@multiple-creature.party>2020-01-11 03:03:26 -0600
commit2cf1a16ff73bb7401579ca6306e0a537ba2fe12e (patch)
treec7ddc610b91067d71ab2c100a330aac69d386ad1 /app/controllers
parent51443a2ccb89df35b94109627efc01b8c63ceb2e (diff)
pass monsterfork api exposure setting to initial state serializer
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/home_controller.rb2
-rw-r--r--app/controllers/public_timelines_controller.rb2
-rw-r--r--app/controllers/shares_controller.rb2
-rw-r--r--app/controllers/tags_controller.rb2
4 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb
index 97a0a72d9..d086d19cd 100644
--- a/app/controllers/home_controller.rb
+++ b/app/controllers/home_controller.rb
@@ -46,7 +46,7 @@ class HomeController < ApplicationController
   end
 
   def set_initial_state_json
-    serializable_resource = ActiveModelSerializers::SerializableResource.new(InitialStatePresenter.new(initial_state_params), serializer: InitialStateSerializer)
+    serializable_resource = ActiveModelSerializers::SerializableResource.new(InitialStatePresenter.new(initial_state_params), serializer: InitialStateSerializer), monsterfork_api: monsterfork_api
     @initial_state_json   = serializable_resource.to_json
   end
 
diff --git a/app/controllers/public_timelines_controller.rb b/app/controllers/public_timelines_controller.rb
index c5fe789f4..ab774c20c 100644
--- a/app/controllers/public_timelines_controller.rb
+++ b/app/controllers/public_timelines_controller.rb
@@ -13,7 +13,7 @@ class PublicTimelinesController < ApplicationController
       format.html do
         @initial_state_json = ActiveModelSerializers::SerializableResource.new(
           InitialStatePresenter.new(settings: { known_fediverse: Setting.show_known_fediverse_at_about_page }, token: current_session&.token),
-          serializer: InitialStateSerializer
+          serializer: InitialStateSerializer, monsterfork_api: monsterfork_api
         ).to_json
       end
     end
diff --git a/app/controllers/shares_controller.rb b/app/controllers/shares_controller.rb
index ada4eec54..5d7a14949 100644
--- a/app/controllers/shares_controller.rb
+++ b/app/controllers/shares_controller.rb
@@ -8,7 +8,7 @@ class SharesController < ApplicationController
   before_action :set_body_classes
 
   def show
-    serializable_resource = ActiveModelSerializers::SerializableResource.new(InitialStatePresenter.new(initial_state_params), serializer: InitialStateSerializer)
+    serializable_resource = ActiveModelSerializers::SerializableResource.new(InitialStatePresenter.new(initial_state_params), serializer: InitialStateSerializer), monsterfork_api: monsterfork_api
     @initial_state_json   = serializable_resource.to_json
   end
 
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb
index 5cb048c1a..f89e8afba 100644
--- a/app/controllers/tags_controller.rb
+++ b/app/controllers/tags_controller.rb
@@ -16,7 +16,7 @@ class TagsController < ApplicationController
         use_pack 'about'
         @initial_state_json = ActiveModelSerializers::SerializableResource.new(
           InitialStatePresenter.new(settings: {}, token: current_session&.token),
-          serializer: InitialStateSerializer
+          serializer: InitialStateSerializer, monsterfork_api: monsterfork_api
         ).to_json
       end