Merge pull request #2475 from internetee/fix-domain-contacts-repp

Fix domain contacts repp
This commit is contained in:
Timo Võhmar 2022-11-17 09:45:56 +02:00 committed by GitHub
commit 4328ebbfcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 7 deletions

View file

@ -41,9 +41,7 @@ module Repp
def cta(action = 'add')
params[:contacts].each { |c| c[:action] = action }
action = Actions::DomainUpdate.new(@domain, contact_create_params, false)
# rubocop:disable Style/AndOr
handle_errors(@domain) and return unless action.call
# rubocop:enable Style/AndOr
render_success(data: { domain: { name: @domain.name } })
end