mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 15:06:23 +02:00
move validator from callback to action interactor and to the api controller
This commit is contained in:
parent
f4d276fc44
commit
8eee65579b
9 changed files with 127 additions and 116 deletions
|
@ -144,6 +144,10 @@ module Api
|
|||
def update_and_notify!(contact)
|
||||
contact.transaction do
|
||||
contact.save!
|
||||
|
||||
contact.validate_email_by_regex_and_mx
|
||||
contact.remove_force_delete_for_valid_contact
|
||||
|
||||
action = current_registrant_user.actions.create!(contact: contact, operation: :update)
|
||||
contact.registrar.notify(action)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue