mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-16 12:12:14 +00:00
92658f0fb0
* Add tests * Fix instance actor not being dereferenceable * Fix tests * Fix tests for real
24 lines
643 B
Ruby
24 lines
643 B
Ruby
# frozen_string_literal: true
|
|
|
|
class InstanceActorsController < ApplicationController
|
|
include AccountControllerConcern
|
|
|
|
skip_before_action :check_account_confirmation
|
|
skip_around_action :set_locale
|
|
|
|
def show
|
|
expires_in 10.minutes, public: true
|
|
render json: @account, content_type: 'application/activity+json', serializer: ActivityPub::ActorSerializer, adapter: ActivityPub::Adapter, fields: restrict_fields_to
|
|
end
|
|
|
|
private
|
|
|
|
def set_account
|
|
@account = Account.representative
|
|
end
|
|
|
|
def restrict_fields_to
|
|
%i(id type preferred_username inbox outbox public_key endpoints url manually_approves_followers)
|
|
end
|
|
end
|