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