emojis_controller.rb 465 B

12345678910111213141516171819202122
  1. # frozen_string_literal: true
  2. class EmojisController < ApplicationController
  3. before_action :set_emoji
  4. def show
  5. respond_to do |format|
  6. format.json do
  7. render json: @emoji,
  8. serializer: ActivityPub::EmojiSerializer,
  9. adapter: ActivityPub::Adapter,
  10. content_type: 'application/activity+json'
  11. end
  12. end
  13. end
  14. private
  15. def set_emoji
  16. @emoji = CustomEmoji.local.find(params[:id])
  17. end
  18. end