parent
8bd8ea7c04
commit
94e213c6c1
@ -1,18 +0,0 @@ |
||||
# frozen_string_literal: true |
||||
|
||||
class Api::Activitypub::AccountsController < ApiController |
||||
before_action :set_account |
||||
|
||||
respond_to :'application/activity+json' |
||||
respond_to :'application/ld+json; profile="https://www.w3.org/ns/activitystreams#"' |
||||
|
||||
def show |
||||
render content_type: :'application/ld+json; profile="https://www.w3.org/ns/activitystreams#"' |
||||
end |
||||
|
||||
private |
||||
|
||||
def set_account |
||||
@account = Account.find(params[:id]) |
||||
end |
||||
end |
@ -1,8 +1,7 @@ |
||||
extends 'activitypub/types/person.rabl' |
||||
|
||||
object @account |
||||
|
||||
node(:'@context') { 'https://www.w3.org/ns/activitystreams' } |
||||
node(:type) { 'Person' } |
||||
node(:id) { request.original_url } |
||||
node(:url) { |account| TagManager.instance.url_for(account) } |
||||
node(:name) { |account| account.display_name } |
||||
node(:preferredUsername) { |account| account.username } |
@ -0,0 +1 @@ |
||||
node(:'@context') { 'https://www.w3.org/ns/activitystreams' } |
@ -0,0 +1,3 @@ |
||||
extends 'activitypub/base.rabl' |
||||
|
||||
node(:id) { request.original_url } |
@ -0,0 +1,3 @@ |
||||
extends 'activitypub/intransient.rabl' |
||||
|
||||
node(:type) { 'Person' } |
@ -1,4 +1,5 @@ |
||||
# Be sure to restart your server when you modify this file. |
||||
|
||||
Mime::Type.register "application/json", :json, %w( text/x-json application/jsonrequest application/jrd+json ) |
||||
Mime::Type.register "text/xml", :xml, %w( application/xml application/atom+xml application/xrd+xml ) |
||||
Mime::Type.register "application/json", :json, %w( text/x-json application/jsonrequest application/jrd+json ) |
||||
Mime::Type.register "text/xml", :xml, %w( application/xml application/atom+xml application/xrd+xml ) |
||||
Mime::Type.register "application/activity+json", :activitystreams2 |
||||
|
Loading…
Reference in new issue