mastodon/app/controllers/api/v1/instances/terms_of_services_controller.rb
2024-12-09 10:04:46 +00:00

16 lines
387 B
Ruby

# frozen_string_literal: true
class Api::V1::Instances::TermsOfServicesController < Api::V1::Instances::BaseController
before_action :set_terms_of_service
def show
cache_even_if_authenticated!
render json: @terms_of_service, serializer: REST::PrivacyPolicySerializer
end
private
def set_terms_of_service
@terms_of_service = TermsOfService.live.first!
end
end