2017-10-07 15:43:42 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class EmojisController < ApplicationController
|
|
|
|
before_action :set_emoji
|
2023-04-19 14:07:29 +00:00
|
|
|
|
|
|
|
vary_by -> { 'Signature' if authorized_fetch_mode? }
|
2017-10-07 15:43:42 +00:00
|
|
|
|
|
|
|
def show
|
2023-04-19 14:07:29 +00:00
|
|
|
expires_in 3.minutes, public: true
|
|
|
|
render_with_cache json: @emoji, content_type: 'application/activity+json', serializer: ActivityPub::EmojiSerializer, adapter: ActivityPub::Adapter
|
2017-10-07 15:43:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def set_emoji
|
|
|
|
@emoji = CustomEmoji.local.find(params[:id])
|
|
|
|
end
|
|
|
|
end
|