修改更新报403的问题

This commit is contained in:
sylor_huang@126.com 2020-04-15 16:28:09 +08:00
parent 1456764e5b
commit e8df65e489
1 changed files with 2 additions and 6 deletions

View File

@ -65,17 +65,13 @@ class AccountsController < ApplicationController
u.save!
sync_params = {}
Rails.logger.info("######_________user_param_mail________#############{user_params["mail"]}")
Rails.logger.info("######_________user_mail________#############{user_mail}")
Rails.logger.info("######_________user_param_login________#############{user_params["login"]}")
if (user_params["mail"] && user_params["mail"] != user_mail) || (user_params["login"] && user_params["login"] != params[:old_user_login])
sync_params = sync_params.merge(email: user_params["mail"], username: user_params["login"])
sync_params = sync_params.merge(email: user_params["mail"], login_name: user_params["login"])
end
if sync_params.present?
update_gitea = Gitea::User::UpdateService.call(u.gitea_token, params[:old_user_login], sync_params)
update_gitea = Gitea::User::UpdateService.call("", params[:old_user_login], sync_params)
Rails.logger.info("########________update_gitea__________###########__status:_#{update_gitea.status}")
end
end