1
0
Fork 0
forked from fedi/mastodon

Simplify RABL

This commit is contained in:
Evan Minto 2017-02-06 11:39:08 -08:00
parent 94e213c6c1
commit 3fa5d05997

View file

@ -2,8 +2,7 @@ extends 'activitypub/types/person.rabl'
object @account
node(:url) { |account| TagManager.instance.url_for(account) }
node(:name) { |account| account.display_name }
node(:preferredUsername) { |account| account.username }
node(:summary) { |account| account.note }
attributes display_name: :name, username: :preferredUsername, note: :summary
node(:icon) { |account| full_asset_url(account.avatar.url(:original)) }
node(:image) { |account| full_asset_url(account.header.url(:original)) }