mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 07:04:47 +02:00
Add epp errors support to bulk renew
This commit is contained in:
parent
0f812d0b15
commit
79351d50d9
8 changed files with 42 additions and 22 deletions
|
@ -108,7 +108,7 @@ module Repp
|
|||
api :POST, '/repp/v1/domains/transfer'
|
||||
desc 'Transfer multiple domains'
|
||||
def transfer
|
||||
@errors ||= []
|
||||
@errors ||= ActiveModel::Errors.new(self)
|
||||
@successful = []
|
||||
|
||||
transfer_params[:domain_transfers].each do |transfer|
|
||||
|
@ -150,8 +150,9 @@ module Repp
|
|||
if action.call
|
||||
@successful << { type: 'domain_transfer', domain_name: domain.name }
|
||||
else
|
||||
@errors << { type: 'domain_transfer', domain_name: domain.name,
|
||||
errors: domain.errors.where(:epp_errors)[0].options }
|
||||
domain.errors.where(:epp_errors).each do |domain_error|
|
||||
@errors.import domain_error
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -187,7 +188,7 @@ module Repp
|
|||
end
|
||||
|
||||
def set_authorized_domain
|
||||
@epp_errors ||= []
|
||||
@epp_errors ||= ActiveModel::Errors.new(self)
|
||||
@domain = domain_from_url_hash
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue