Fixed domain add/remove contacts endpoints

This commit is contained in:
Sergei Tsõganov 2022-11-04 12:48:20 +02:00
parent 078e67fce5
commit 936ff18de2
3 changed files with 16 additions and 11 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