修改更新报403的问题
This commit is contained in:
parent
1456764e5b
commit
e8df65e489
|
@ -65,17 +65,13 @@ class AccountsController < ApplicationController
|
||||||
u.save!
|
u.save!
|
||||||
|
|
||||||
sync_params = {}
|
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])
|
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
|
end
|
||||||
|
|
||||||
if sync_params.present?
|
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}")
|
Rails.logger.info("########________update_gitea__________###########__status:_#{update_gitea.status}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue