about summary refs log tree commit diff
path: root/app/controllers/api/v1/instances
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-07-23 20:54:15 -0700
committerReverite <github@reverite.sh>2019-07-23 20:54:15 -0700
commitfee3abd1dce8f437e3514cb03816ae50862b3c4c (patch)
tree72e19e9e748edce7024737cfb70f9088346058bd /app/controllers/api/v1/instances
parent9148c3e8479e59df9f9a4889ef58a959f60f6606 (diff)
parent08325db62bcc4d5d530513c615bc1c733f166239 (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'app/controllers/api/v1/instances')
-rw-r--r--app/controllers/api/v1/instances/activity_controller.rb3
-rw-r--r--app/controllers/api/v1/instances/peers_controller.rb3
2 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/api/v1/instances/activity_controller.rb b/app/controllers/api/v1/instances/activity_controller.rb
index 09edfe365..d0080c5c2 100644
--- a/app/controllers/api/v1/instances/activity_controller.rb
+++ b/app/controllers/api/v1/instances/activity_controller.rb
@@ -7,7 +7,8 @@ class Api::V1::Instances::ActivityController < Api::BaseController
   respond_to :json
 
   def show
-    render_cached_json('api:v1:instances:activity:show', expires_in: 1.day) { activity }
+    expires_in 1.day, public: true
+    render_with_cache json: :activity, expires_in: 1.day
   end
 
   private
diff --git a/app/controllers/api/v1/instances/peers_controller.rb b/app/controllers/api/v1/instances/peers_controller.rb
index a8891d126..450e6502f 100644
--- a/app/controllers/api/v1/instances/peers_controller.rb
+++ b/app/controllers/api/v1/instances/peers_controller.rb
@@ -7,7 +7,8 @@ class Api::V1::Instances::PeersController < Api::BaseController
   respond_to :json
 
   def index
-    render_cached_json('api:v1:instances:peers:index', expires_in: 1.day) { Account.remote.domains }
+    expires_in 1.day, public: true
+    render_with_cache(expires_in: 1.day) { Account.remote.domains }
   end
 
   private