extended_descriptions_controller.rb 483 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. class Api::V1::Instances::ExtendedDescriptionsController < Api::BaseController
  3. skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
  4. before_action :set_extended_description
  5. def show
  6. expires_in 3.minutes, public: true
  7. render json: @extended_description, serializer: REST::ExtendedDescriptionSerializer
  8. end
  9. private
  10. def set_extended_description
  11. @extended_description = ExtendedDescription.current
  12. end
  13. end