mirror of
https://github.com/internetee/registry.git
synced 2025-07-02 17:23:34 +02:00
parent
340e61804b
commit
4b836f1476
23 changed files with 54 additions and 47 deletions
|
@ -6,11 +6,11 @@ module Repp
|
|||
post '/' do
|
||||
params['domainTransfers'].each do |domain_transfer|
|
||||
domain_name = domain_transfer['domainName']
|
||||
auth_info = domain_transfer['authInfo']
|
||||
transfer_code = domain_transfer['transferCode']
|
||||
new_registrar = current_user.registrar
|
||||
|
||||
domain = Domain.find_by(name: domain_name)
|
||||
domain.transfer(registrar: new_registrar, auth_info: auth_info)
|
||||
domain.transfer(registrar: new_registrar, transfer_code: transfer_code)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -32,7 +32,7 @@ module Repp
|
|||
domain = ident =~ /\A[0-9]+\z/ ? Domain.find_by(id: ident) : Domain.find_by_idn(ident)
|
||||
|
||||
error! I18n.t('errors.messages.epp_domain_not_found'), 404 unless domain
|
||||
error! I18n.t('errors.messages.epp_authorization_error'), 401 unless domain.auth_info.eql? request.headers['Auth-Code']
|
||||
error! I18n.t('errors.messages.epp_authorization_error'), 401 unless domain.transfer_code.eql? request.headers['Auth-Code']
|
||||
|
||||
contact_repp_json = proc{|contact|
|
||||
contact.as_json.slice("code", "name", "ident", "ident_type", "ident_country_code", "phone", "email", "street", "city", "zip","country_code", "statuses")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue