about summary refs log tree commit diff
path: root/app/controllers/instance_actors_controller.rb
blob: 41f33602e690a7e898e65192215949cecf6791ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

class InstanceActorsController < ApplicationController
  include AccountControllerConcern

  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.find(-99)
  end

  def restrict_fields_to
    %i(id type preferred_username inbox public_key endpoints url manually_approves_followers)
  end
end