修改remote_update
This commit is contained in:
parent
740477dcd2
commit
24f54032d2
|
@ -45,12 +45,24 @@ class AccountsController < ApplicationController
|
|||
|
||||
u = User.find_by(login: params[:old_user_login])
|
||||
user_mail = u.try(:mail)
|
||||
Rails.logger.info("#########____params[:old_user_login]________#######{params[:old_user_login]}")
|
||||
Rails.logger.info("#########_____update_user_params________#######{user_params}")
|
||||
Rails.logger.info("#########_____update_user_extension_params________#######{user_extension_params}")
|
||||
Rails.logger.info("#########____u________#######{u&.id}")
|
||||
|
||||
|
||||
if u.present?
|
||||
u.update_attributes(user_params)
|
||||
u.user_extension.update_attributes(user_extension_params)
|
||||
if u.update_attributes(user_params)
|
||||
Rails.logger.info("#####______update_success_________###########")
|
||||
else
|
||||
Rails.logger.info("#####______update_error_________###########{u.errors.messages}")
|
||||
end
|
||||
|
||||
if u.user_extension.update_attributes(user_extension_params)
|
||||
Rails.logger.info("#####______update_extension_+success_________###########")
|
||||
else
|
||||
Rails.logger.info("#####______update_extension___error_________###########{u.user_extension.errors.messages}")
|
||||
end
|
||||
end
|
||||
|
||||
sync_params = {}
|
||||
|
@ -68,6 +80,7 @@ class AccountsController < ApplicationController
|
|||
update_gitea = Gitea::User::UpdateService.call(admin_user, sync_params)
|
||||
Rails.logger.info("########________update_gitea__________###########__status:_#{update_gitea.status}")
|
||||
end
|
||||
render_ok({})
|
||||
end
|
||||
rescue Exception => e
|
||||
uid_logger_error(e.message)
|
||||
|
|
Loading…
Reference in New Issue