instance_actors_controller.rb 582 B

12345678910111213141516171819202122
  1. # frozen_string_literal: true
  2. class InstanceActorsController < ApplicationController
  3. include AccountControllerConcern
  4. skip_around_action :set_locale
  5. def show
  6. expires_in 10.minutes, public: true
  7. render json: @account, content_type: 'application/activity+json', serializer: ActivityPub::ActorSerializer, adapter: ActivityPub::Adapter, fields: restrict_fields_to
  8. end
  9. private
  10. def set_account
  11. @account = Account.find(-99)
  12. end
  13. def restrict_fields_to
  14. %i(id type preferred_username inbox public_key endpoints url manually_approves_followers)
  15. end
  16. end