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