1
0
Fork 0
forked from gitea/nas

Add profile bio markdown option

This commit is contained in:
KMY 2023-07-07 08:45:01 +09:00
parent fc87e18044
commit ebb0dec334
6 changed files with 18 additions and 3 deletions

View file

@ -5,6 +5,12 @@ class UpdateAccountService < BaseService
was_locked = account.locked
update_method = raise_error ? :update! : :update
if account.user && params.key?(:bio_markdown)
user_params = { settings_attributes: { bio_markdown: params['bio_markdown'] } }
params.delete(:bio_markdown)
account.user.send(update_method, user_params)
end
account.send(update_method, params).tap do |ret|
next unless ret