REPP: Add contact:destroy action

This commit is contained in:
Karl Erik Õunapuu 2020-10-21 11:54:25 +03:00
parent 516b2180ca
commit f9bef781ab
No known key found for this signature in database
GPG key ID: C9DD647298A34764
5 changed files with 104 additions and 30 deletions

View file

@ -44,12 +44,13 @@ module Epp
def delete
authorize! :delete, @contact, @password
if @contact.destroy_and_clean(params[:parsed_frame])
render_epp_response '/epp/contacts/delete'
else
action = Actions::ContactDelete.new(@contact, params[:legal_document])
unless action.call
handle_errors(@contact)
return
end
render_epp_response '/epp/contacts/delete'
end
def renew