Merge branch 'kb_development' into kb_migration
This commit is contained in:
commit
8c0b01c99b
2 changed files with 9 additions and 6 deletions
|
@ -5,7 +5,7 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
|||
include FormattingHelper
|
||||
|
||||
attributes :id, :username, :acct, :display_name, :locked, :bot, :discoverable, :group, :created_at,
|
||||
:note, :url, :avatar, :avatar_static, :header, :header_static, :searchability, :dissubscribable,
|
||||
:note, :url, :avatar, :avatar_static, :header, :header_static, :searchability, :subscribable,
|
||||
:followers_count, :following_count, :statuses_count, :last_status_at
|
||||
|
||||
has_one :moved_to_account, key: :moved, serializer: REST::AccountSerializer, if: :moved_and_not_nested?
|
||||
|
@ -106,6 +106,10 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
|||
object.suspended? ? false : object.discoverable
|
||||
end
|
||||
|
||||
def subscribable
|
||||
!object.dissubscribable
|
||||
end
|
||||
|
||||
def moved_to_account
|
||||
object.suspended? ? nil : AccountDecorator.new(object.moved_to_account)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue