mirror of
https://github.com/internetee/registry.git
synced 2025-06-04 03:37:28 +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
|
||||
def create
|
||||
authorize!(:create, Epp::Domain)
|
||||
puts params
|
||||
@domain = Epp::Domain.new
|
||||
action = Actions::DomainCreate.new(@domain, domain_create_params)
|
||||
|
||||
handle_errors(@domain) and return unless action.call
|
||||
|
||||
render_success(create_update_success_body)
|
||||
render_success(data: { domain: { name: @domain.name } })
|
||||
end
|
||||
|
||||
def transfer_info
|
||||
|
@ -125,7 +124,6 @@ module Repp
|
|||
def domain_create_params
|
||||
params.require(:domain).require([:name, :registrant_id, :period, :period_unit])
|
||||
params.require(:domain).permit(:name, :registrant_id, :period, :period_unit, :registrar_id)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -64,9 +64,6 @@ module Actions
|
|||
end
|
||||
|
||||
def assign_domain_attributes
|
||||
puts "FOOOK"
|
||||
puts params
|
||||
puts "AYYYYY #{params[:name]}"
|
||||
domain.name = params[:name].strip.downcase
|
||||
domain.registrar = Registrar.find(params[:registrar_id])
|
||||
assign_domain_period
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue