REPP:: Contact create/update legaldoc test

This commit is contained in:
Karl Erik Õunapuu 2020-10-20 15:36:40 +03:00
parent 33f6da53c1
commit ddc26b81b1
No known key found for this signature in database
GPG key ID: C9DD647298A34764
3 changed files with 52 additions and 6 deletions

View file

@ -28,7 +28,7 @@ module Repp
## POST /repp/v1/contacts
def create
@contact = Epp::Contact.new(contact_params_with_address, current_user.registrar, epp: false)
action = Actions::ContactCreate.new(@contact, params[:legal_documents],
action = Actions::ContactCreate.new(@contact, params[:legal_document],
contact_ident_params)
unless action.call
@ -116,11 +116,6 @@ module Repp
params.require(:contact).permit(addr: %i[country_code city street zip])
end
end
def legal_document_params
params.require(:legal_document).require(%i[body type])
params.require(:legal_document).permit(:body, :type)
end
end
end
end