mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 13:44:47 +02:00
REPP: Specific domain transfer action
This commit is contained in:
parent
1d9850fb98
commit
06088e33c5
4 changed files with 45 additions and 7 deletions
|
@ -99,8 +99,8 @@ module Repp
|
|||
render_success(data: data)
|
||||
end
|
||||
|
||||
api :POST, '/repp/v1/domains/:domain_name/transfer'
|
||||
desc 'Transfer specific domain'
|
||||
api :POST, '/repp/v1/domains/transfer'
|
||||
desc 'Transfer multiple domains'
|
||||
def transfer
|
||||
@errors ||= []
|
||||
@successful = []
|
||||
|
@ -112,8 +112,6 @@ module Repp
|
|||
render_success(data: { success: @successful, failed: @errors })
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def initiate_transfer(transfer)
|
||||
domain = Epp::Domain.find_or_initialize_by(name: transfer[:domain_name])
|
||||
action = Actions::DomainTransfer.new(domain, transfer[:transfer_code],
|
||||
|
@ -127,6 +125,8 @@ module Repp
|
|||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def transfer_params
|
||||
params.require(:data).require(:domain_transfers).each do |t|
|
||||
t.require(:domain_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue