mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
Basic transfer command for domain
This commit is contained in:
parent
bb78c0f581
commit
707c60b36e
8 changed files with 76 additions and 2 deletions
|
@ -59,6 +59,18 @@ module Epp::DomainsHelper
|
|||
end
|
||||
end
|
||||
|
||||
def transfer_domain
|
||||
@domain = find_domain
|
||||
|
||||
handle_errors(@domain) and return unless @domain
|
||||
|
||||
@domain.transfer_requested_at = Time.now
|
||||
@domain.transferred_at = Time.now
|
||||
@domain.save
|
||||
|
||||
render '/epp/domains/transfer'
|
||||
end
|
||||
|
||||
### HELPER METHODS ###
|
||||
|
||||
private
|
||||
|
@ -104,6 +116,12 @@ module Epp::DomainsHelper
|
|||
xml_attrs_present?(@ph, [['name']])
|
||||
end
|
||||
|
||||
## TRANSFER
|
||||
def validate_domain_transfer_request
|
||||
@ph = params_hash['epp']['command']['transfer']['transfer']
|
||||
xml_attrs_present?(@ph, [['name']])
|
||||
end
|
||||
|
||||
## SHARED
|
||||
def find_domain
|
||||
domain = Domain.find_by(name: @ph[:name])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue