This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2019-07-18 16:44:42 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class InstanceActorsController < ApplicationController
|
|
|
|
include AccountControllerConcern
|
|
|
|
|
2019-08-13 06:30:37 -07:00
|
|
|
skip_around_action :set_locale
|
|
|
|
|
2019-07-18 16:44:42 -07:00
|
|
|
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
|