mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 12:17:30 +02:00
23 lines
671 B
Ruby
23 lines
671 B
Ruby
module Repp
|
|
module V1
|
|
module Domains
|
|
class AdminContactsController < BaseContactsController
|
|
def update
|
|
super
|
|
|
|
unless @new_contact.identical_to?(@current_contact)
|
|
@epp_errors.add(:epp_errors,
|
|
msg: 'Admin contacts must be identical',
|
|
code: '2304')
|
|
end
|
|
|
|
return handle_errors if @epp_errors.any?
|
|
|
|
affected, skipped = AdminDomainContact.replace(@current_contact, @new_contact)
|
|
@response = { affected_domains: affected, skipped_domains: skipped }
|
|
render_success(data: @response)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|