mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 08:52:04 +02:00
Epp contact tests now 10x faster
This commit is contained in:
parent
4e7b0e6104
commit
4401d8495e
9 changed files with 361 additions and 324 deletions
|
@ -16,6 +16,7 @@ class Epp::ContactsController < EppController
|
|||
def update
|
||||
# FIXME: Update returns 2303 update multiple times
|
||||
code = params_hash['epp']['command']['update']['update'][:id]
|
||||
|
||||
@contact = Contact.where(code: code).first
|
||||
# if update_rights? && stamp(@contact) && @contact.update_attributes(contact_and_address_attributes(:update))
|
||||
if owner? && stamp(@contact) && @contact.update_attributes(contact_and_address_attributes(:update))
|
||||
|
|
|
@ -124,6 +124,7 @@ class EppController < ApplicationController
|
|||
# rubocop: enable Style/PredicateName
|
||||
|
||||
def write_to_epp_log
|
||||
return nil if EPP_LOG_ENABLED
|
||||
request_command = params[:command] || params[:action] # error receives :command, other methods receive :action
|
||||
ApiLog::EppLog.create({
|
||||
request: params[:raw_frame] || params[:frame],
|
||||
|
|
|
@ -11,7 +11,8 @@ xml.epp_head do
|
|||
xml.tag!('contact:voice', @contact.phone) if @disclosure.try(:phone) || @owner
|
||||
xml.tag!('contact:fax', @contact.fax) if @disclosure.try(:fax) || @owner
|
||||
xml.tag!('contact:email', @contact.email) if @disclosure.try(:email) || @owner
|
||||
#xml.tag!('contact:clID', @current_epp_user.username) if @current_epp_user
|
||||
xml.tag!('contact:clID', @contact.registrar.try(:name))
|
||||
|
||||
#xml.tag!('contact:crID', @contact.cr_id ) if @contact.cr_id
|
||||
xml.tag!('contact:crDate', @contact.created_at)
|
||||
xml.tag!('contact:upID', @contact.up_id) if @contact.up_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue