This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2017-10-07 17:43:42 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class EmojisController < ApplicationController
|
|
|
|
before_action :set_emoji
|
2023-04-19 16:07:29 +02:00
|
|
|
|
|
|
|
vary_by -> { 'Signature' if authorized_fetch_mode? }
|
2017-10-07 17:43:42 +02:00
|
|
|
|
|
|
|
def show
|
2023-04-19 16:07:29 +02: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 17:43:42 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def set_emoji
|
|
|
|
@emoji = CustomEmoji.local.find(params[:id])
|
|
|
|
end
|
|
|
|
end
|