diff --git a/app/controllers/repp/v1/accounts_controller.rb b/app/controllers/repp/v1/accounts_controller.rb index e14f7ecdb..8aee2d294 100644 --- a/app/controllers/repp/v1/accounts_controller.rb +++ b/app/controllers/repp/v1/accounts_controller.rb @@ -25,6 +25,7 @@ module Repp types_for_select: AccountActivity.types_for_select }) end + # rubocop:disable Metrics/MethodLength api :get, '/repp/v1/accounts/details' desc 'Get current registrar account details' def details @@ -42,6 +43,7 @@ module Repp interfaces: WhiteIp::INTERFACES } render_success(data: resp) end + # rubocop:enable Metrics/MethodLength api :put, '/repp/v1/accounts' desc 'Update current registrar account details' diff --git a/app/models/white_ip.rb b/app/models/white_ip.rb index e57bff8b2..ec23030c2 100644 --- a/app/models/white_ip.rb +++ b/app/models/white_ip.rb @@ -78,8 +78,8 @@ class WhiteIp < ApplicationRecord %w[IPv4 IPv6 Interfaces Created Updated] end - def ransackable_attributes(auth_object = nil) - ["created_at", "creator_str", "id", "interfaces", "ipv4", "ipv6", "registrar_id", "updated_at", "updator_str"] + def ransackable_attributes(*) + authorizable_ransackable_attributes end end diff --git a/lib/serializers/repp/api_user.rb b/lib/serializers/repp/api_user.rb index c17482d9e..08f15b106 100644 --- a/lib/serializers/repp/api_user.rb +++ b/lib/serializers/repp/api_user.rb @@ -7,6 +7,7 @@ module Serializers @user = user end + # rubocop:disable Metrics/MethodLength def to_json(obj = user) json = { id: obj.id, @@ -24,6 +25,7 @@ module Serializers json[:certificates] = certificates json end + # rubocop:enable Metrics/MethodLength private diff --git a/lib/serializers/repp/invoice.rb b/lib/serializers/repp/invoice.rb index ceef7c654..52e09ccb3 100644 --- a/lib/serializers/repp/invoice.rb +++ b/lib/serializers/repp/invoice.rb @@ -81,7 +81,7 @@ module Serializers total: invoice.total, recipient: invoice.buyer.billing_email, monthly_invoice: invoice.monthly_invoice, - reference_no: invoice.reference_no + reference_no: invoice.reference_no, } end # rubocop:enable Metrics/MethodLength