about summary refs log tree commit diff
path: root/app/controllers/api/v1/custom_emojis_controller.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-01-11 10:53:58 +0100
committerGitHub <noreply@github.com>2019-01-11 10:53:58 +0100
commit2cfa55185a5fc7d93a160a4e9a4730aae6725b0f (patch)
treec57169b5a3d717f4e68b8ec5d2d6e220d1456434 /app/controllers/api/v1/custom_emojis_controller.rb
parentd1da0a1086fa25f22739277fbf32ba1b3745317d (diff)
parent394525e32994e605093c87d3a9fad2a4202f3401 (diff)
Merge pull request #885 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/api/v1/custom_emojis_controller.rb')
-rw-r--r--app/controllers/api/v1/custom_emojis_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/api/v1/custom_emojis_controller.rb b/app/controllers/api/v1/custom_emojis_controller.rb
index f8cd64455..7bac27da4 100644
--- a/app/controllers/api/v1/custom_emojis_controller.rb
+++ b/app/controllers/api/v1/custom_emojis_controller.rb
@@ -4,6 +4,8 @@ class Api::V1::CustomEmojisController < Api::BaseController
   respond_to :json
 
   def index
-    render json: CustomEmoji.local.where(disabled: false), each_serializer: REST::CustomEmojiSerializer
+    render_cached_json('api:v1:custom_emojis', expires_in: 1.minute) do
+      ActiveModelSerializers::SerializableResource.new(CustomEmoji.local.where(disabled: false), each_serializer: REST::CustomEmojiSerializer)
+    end
   end
 end