mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
Refactor EPP login password change
This commit is contained in:
parent
087300ff9d
commit
7ba5b3b2ae
1 changed files with 5 additions and 4 deletions
|
@ -87,10 +87,11 @@ module Epp
|
|||
end
|
||||
|
||||
if success
|
||||
if params[:parsed_frame].css('newPW').first
|
||||
unless @api_user.update(plain_text_password: params[:parsed_frame].css('newPW').first.text)
|
||||
handle_errors(@api_user) and return
|
||||
end
|
||||
new_password = params[:parsed_frame].at_css('newPW')&.text
|
||||
|
||||
if new_password.present?
|
||||
@api_user.plain_text_password = new_password
|
||||
@api_user.save!
|
||||
end
|
||||
|
||||
epp_session = EppSession.new
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue