diff --git a/app/controllers/api/v1/registrant/domains_controller.rb b/app/controllers/api/v1/registrant/domains_controller.rb index 12b060e6c..94d2c865a 100644 --- a/app/controllers/api/v1/registrant/domains_controller.rb +++ b/app/controllers/api/v1/registrant/domains_controller.rb @@ -4,6 +4,8 @@ module Api module V1 module Registrant class DomainsController < ::Api::V1::Registrant::BaseController + before_action :set_tech_flag, only: [:show] + def index limit = params[:limit] || 200 offset = params[:offset] || 0 @@ -42,6 +44,12 @@ module Api private + def set_tech_flag + # current_user_domains scope depends on tech flag + # However, if it's not present, tech contact can not see specific domain entry at all. + params.merge!(tech: 'true') + end + def current_user_domains_total_count current_registrant_user.domains.count rescue CompanyRegister::NotAvailableError