about summary refs log tree commit diff
path: root/app/serializers/rest
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-05-02 15:57:37 +0200
committerGitHub <noreply@github.com>2018-05-02 15:57:37 +0200
commitcae933510cbc64db27aeb44e205ce17ff4974da7 (patch)
treee009754d98cddbe43b53f0c3e05ee4376749b50d /app/serializers/rest
parentf62539ce5c106e27a371702d499ec4df52eccde6 (diff)
Allow updating bio fields via PUT /api/v1/accounts/update_credentials (#7288)
Add raw bio fields to the source attribute on GET /api/v1/accounts/verify_credentials
Diffstat (limited to 'app/serializers/rest')
-rw-r--r--app/serializers/rest/credential_account_serializer.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/serializers/rest/credential_account_serializer.rb b/app/serializers/rest/credential_account_serializer.rb
index 870d8b71f..56857cba8 100644
--- a/app/serializers/rest/credential_account_serializer.rb
+++ b/app/serializers/rest/credential_account_serializer.rb
@@ -5,10 +5,12 @@ class REST::CredentialAccountSerializer < REST::AccountSerializer
 
   def source
     user = object.user
+
     {
       privacy: user.setting_default_privacy,
       sensitive: user.setting_default_sensitive,
       note: object.note,
+      fields: object.fields.map(&:to_h),
     }
   end
 end