mirror of
https://github.com/internetee/registry.git
synced 2025-07-29 14:06:21 +02:00
Remove contact code cache from domain contacts table
This commit is contained in:
parent
3852620180
commit
750bf0821c
11 changed files with 42 additions and 50 deletions
|
@ -14,8 +14,8 @@ module Repp
|
|||
api :GET, '/repp/v1/domains/:domain_name/contacts'
|
||||
desc "View domain's admin and tech contacts"
|
||||
def index
|
||||
admin_contacts = @domain.admin_domain_contacts.pluck(:contact_code_cache)
|
||||
tech_contacts = @domain.tech_domain_contacts.pluck(:contact_code_cache)
|
||||
admin_contacts = @domain.admin_domain_contacts.map(&:contact).pluck(:code)
|
||||
tech_contacts = @domain.tech_domain_contacts.map(&:contact).pluck(:code)
|
||||
|
||||
data = { admin_contacts: admin_contacts, tech_contacts: tech_contacts }
|
||||
render_success(data: data)
|
||||
|
@ -38,7 +38,6 @@ 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue