Commit f8212da3 authored by Yamagishi Kazutoshi's avatar Yamagishi Kazutoshi Committed by Eugen Rochko

Add attribute for default privacy to verify credentials (#4075)

* Add attribute for default privacy to verify credentials

* add raw_note

* source
parent 4122a837
......@@ -6,13 +6,13 @@ class Api::V1::Accounts::CredentialsController < Api::BaseController
def show
@account = current_account
render json: @account, serializer: REST::AccountSerializer
render json: @account, serializer: REST::CredentialAccountSerializer
end
def update
current_account.update!(account_params)
@account = current_account
render json: @account, serializer: REST::AccountSerializer
render json: @account, serializer: REST::CredentialAccountSerializer
end
private
......
# 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment