2017-10-07 16:43:42 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class EmojisController < ApplicationController
|
|
|
|
before_action :set_emoji
|
2023-04-19 15:07:29 +01:00
|
|
|
|
|
|
|
vary_by -> { 'Signature' if authorized_fetch_mode? }
|
2017-10-07 16:43:42 +01:00
|
|
|
|
|
|
|
def show
|
2023-04-19 15:07:29 +01: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 16:43:42 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def set_emoji
|
|
|
|
@emoji = CustomEmoji.local.find(params[:id])
|
|
|
|
end
|
|
|
|
end
|