about summary refs log tree commit diff
path: root/app/serializers/rest
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-07-10 10:29:34 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-07-10 03:29:34 +0200
commitf8212da329cf857478746c23314e5c662cd490e3 (patch)
treeeedd07ed08fef7ff070c7ceb796bde7563ecaed7 /app/serializers/rest
parent4122a837fadf8cf59712b5c1790ac0af96bcbc84 (diff)
Add attribute for default privacy to verify credentials (#4075)
* Add attribute for default privacy to verify credentials

* add raw_note

* source
Diffstat (limited to 'app/serializers/rest')
-rw-r--r--app/serializers/rest/credential_account_serializer.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/serializers/rest/credential_account_serializer.rb b/app/serializers/rest/credential_account_serializer.rb
new file mode 100644
index 000000000..094b831c9
--- /dev/null
+++ b/app/serializers/rest/credential_account_serializer.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class REST::CredentialAccountSerializer < REST::AccountSerializer
+  attributes :source
+
+  def source
+    user = object.user
+    {
+      privacy: user.setting_default_privacy,
+      note: object.note,
+    }
+  end
+end