about summary refs log tree commit diff
path: root/app/models
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/models
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/models')
-rw-r--r--app/models/account.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 0cd2a10d5..a166fb474 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -273,6 +273,10 @@ class Account < ApplicationRecord
       @value   = attr['value']
       @errors  = {}
     end
+
+    def to_h
+      { name: @name, value: @value }
+    end
   end
 
   class << self