mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 20:27:30 +02:00
REPP: Fix domain create success response
This commit is contained in:
parent
d4b84a58df
commit
fcb97df45d
2 changed files with 1 additions and 6 deletions
|
@ -21,13 +21,12 @@ module Repp
|
||||||
## POST /repp/v1/domains
|
## POST /repp/v1/domains
|
||||||
def create
|
def create
|
||||||
authorize!(:create, Epp::Domain)
|
authorize!(:create, Epp::Domain)
|
||||||
puts params
|
|
||||||
@domain = Epp::Domain.new
|
@domain = Epp::Domain.new
|
||||||
action = Actions::DomainCreate.new(@domain, domain_create_params)
|
action = Actions::DomainCreate.new(@domain, domain_create_params)
|
||||||
|
|
||||||
handle_errors(@domain) and return unless action.call
|
handle_errors(@domain) and return unless action.call
|
||||||
|
|
||||||
render_success(create_update_success_body)
|
render_success(data: { domain: { name: @domain.name } })
|
||||||
end
|
end
|
||||||
|
|
||||||
def transfer_info
|
def transfer_info
|
||||||
|
@ -125,7 +124,6 @@ module Repp
|
||||||
def domain_create_params
|
def domain_create_params
|
||||||
params.require(:domain).require([:name, :registrant_id, :period, :period_unit])
|
params.require(:domain).require([:name, :registrant_id, :period, :period_unit])
|
||||||
params.require(:domain).permit(:name, :registrant_id, :period, :period_unit, :registrar_id)
|
params.require(:domain).permit(:name, :registrant_id, :period, :period_unit, :registrar_id)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -64,9 +64,6 @@ module Actions
|
||||||
end
|
end
|
||||||
|
|
||||||
def assign_domain_attributes
|
def assign_domain_attributes
|
||||||
puts "FOOOK"
|
|
||||||
puts params
|
|
||||||
puts "AYYYYY #{params[:name]}"
|
|
||||||
domain.name = params[:name].strip.downcase
|
domain.name = params[:name].strip.downcase
|
||||||
domain.registrar = Registrar.find(params[:registrar_id])
|
domain.registrar = Registrar.find(params[:registrar_id])
|
||||||
assign_domain_period
|
assign_domain_period
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue