mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-21 22:32:58 +00:00
* Add `sensitized` to Admin::Account serializer (fix #19148) * remove whitespace, please linter
This commit is contained in:
parent
89e1974f30
commit
c374729225
|
@ -3,7 +3,7 @@
|
||||||
class REST::Admin::AccountSerializer < ActiveModel::Serializer
|
class REST::Admin::AccountSerializer < ActiveModel::Serializer
|
||||||
attributes :id, :username, :domain, :created_at,
|
attributes :id, :username, :domain, :created_at,
|
||||||
:email, :ip, :role, :confirmed, :suspended,
|
:email, :ip, :role, :confirmed, :suspended,
|
||||||
:silenced, :disabled, :approved, :locale,
|
:silenced, :sensitized, :disabled, :approved, :locale,
|
||||||
:invite_request
|
:invite_request
|
||||||
|
|
||||||
attribute :created_by_application_id, if: :created_by_application?
|
attribute :created_by_application_id, if: :created_by_application?
|
||||||
|
@ -32,6 +32,10 @@ class REST::Admin::AccountSerializer < ActiveModel::Serializer
|
||||||
object.silenced?
|
object.silenced?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def sensitized
|
||||||
|
object.sensitized?
|
||||||
|
end
|
||||||
|
|
||||||
def confirmed
|
def confirmed
|
||||||
object.user_confirmed?
|
object.user_confirmed?
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue