From 3c24673086c6413fa82d9af8c3dda70f8094757c Mon Sep 17 00:00:00 2001 From: Evan Minto Date: Mon, 6 Feb 2017 11:39:08 -0800 Subject: [PATCH] Simplify RABL --- app/views/accounts/show.rabl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/views/accounts/show.rabl b/app/views/accounts/show.rabl index 76aa4a8092..def91b4250 100644 --- a/app/views/accounts/show.rabl +++ b/app/views/accounts/show.rabl @@ -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 } -node(:icon) { |account| full_asset_url(account.avatar.url(:original)) } +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)) }