fedibird-fe/app/controllers/generators_controller.rb

22 lines
539 B
Ruby
Raw Normal View History

2023-02-15 08:04:19 +00:00
# frozen_string_literal: true
class GeneratorsController < ApplicationController
before_action :set_generator
before_action :set_cache_headers
def show
respond_to do |format|
format.json do
expires_in 3.minutes, public: true
render_with_cache json: @generator, content_type: 'application/activity+json', serializer: ActivityPub::GeneratorSerializer, adapter: ActivityPub::Adapter
end
end
end
private
def set_generator
@generator = Doorkeeper::Application.find(params[:id])
end
end