闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
582 B

  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