Remove noai property from account api
This commit is contained in:
parent
d416afd028
commit
f52d4e7a04
1 changed files with 1 additions and 5 deletions
|
@ -7,7 +7,7 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
||||||
attributes :id, :username, :acct, :display_name, :locked, :bot, :discoverable, :group, :created_at,
|
attributes :id, :username, :acct, :display_name, :locked, :bot, :discoverable, :group, :created_at,
|
||||||
:note, :url, :avatar, :avatar_static, :header, :header_static, :searchability, :subscribable,
|
:note, :url, :avatar, :avatar_static, :header, :header_static, :searchability, :subscribable,
|
||||||
:followers_count, :following_count, :statuses_count, :last_status_at, :other_settings,
|
:followers_count, :following_count, :statuses_count, :last_status_at, :other_settings,
|
||||||
:noindex, :noai
|
:noindex
|
||||||
|
|
||||||
has_one :moved_to_account, key: :moved, serializer: REST::AccountSerializer, if: :moved_and_not_nested?
|
has_one :moved_to_account, key: :moved, serializer: REST::AccountSerializer, if: :moved_and_not_nested?
|
||||||
|
|
||||||
|
@ -146,10 +146,6 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
||||||
object.noindex?
|
object.noindex?
|
||||||
end
|
end
|
||||||
|
|
||||||
def noai
|
|
||||||
object.noai?
|
|
||||||
end
|
|
||||||
|
|
||||||
delegate :suspended?, :silenced?, :local?, :memorial?, to: :object
|
delegate :suspended?, :silenced?, :local?, :memorial?, to: :object
|
||||||
|
|
||||||
def moved_and_not_nested?
|
def moved_and_not_nested?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue