From eecd35a4c378396339878e838f59f0a742a928eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergei=20Ts=C3=B5ganov?= Date: Fri, 10 Jun 2022 09:49:52 +0300 Subject: [PATCH] Fixed summary info response --- app/controllers/repp/v1/registrar/summary_controller.rb | 4 ++-- app/models/registrar.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/repp/v1/registrar/summary_controller.rb b/app/controllers/repp/v1/registrar/summary_controller.rb index d3865bed2..ae3bfa579 100644 --- a/app/controllers/repp/v1/registrar/summary_controller.rb +++ b/app/controllers/repp/v1/registrar/summary_controller.rb @@ -71,8 +71,8 @@ module Repp data[:registrar_name] = registrar.name data[:registrar_reg_no] = registrar.reg_no data[:last_login_date] = last_login_date - data[:domains] = registrar.domains.count if can? :view, Depp::Domain - data[:contacts] = registrar.contacts.count if can? :view, Depp::Contact + data[:domains] = registrar.domains.count if can? :info, Depp::Domain + data[:contacts] = registrar.contacts.count if can? :check, Depp::Contact data[:phone] = registrar.phone data[:email] = registrar.email data[:billing_email] = registrar.billing_email diff --git a/app/models/registrar.rb b/app/models/registrar.rb index 1eba314dc..3cd2da760 100644 --- a/app/models/registrar.rb +++ b/app/models/registrar.rb @@ -98,7 +98,7 @@ class Registrar < ApplicationRecord unit: 'piece', quantity: 1, price: amount, - } + }, ] )