Change account rest api property dissubscribable to subscribable
This commit is contained in:
parent
c82781449d
commit
1206fa9334
1 changed files with 5 additions and 1 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