mirror of
https://github.com/internetee/registry.git
synced 2025-07-27 21:16:12 +02:00
Fixed codeclimate issues
This commit is contained in:
parent
6bf3819894
commit
0069d57c6f
4 changed files with 7 additions and 3 deletions
|
@ -25,6 +25,7 @@ module Repp
|
||||||
types_for_select: AccountActivity.types_for_select })
|
types_for_select: AccountActivity.types_for_select })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# rubocop:disable Metrics/MethodLength
|
||||||
api :get, '/repp/v1/accounts/details'
|
api :get, '/repp/v1/accounts/details'
|
||||||
desc 'Get current registrar account details'
|
desc 'Get current registrar account details'
|
||||||
def details
|
def details
|
||||||
|
@ -42,6 +43,7 @@ module Repp
|
||||||
interfaces: WhiteIp::INTERFACES }
|
interfaces: WhiteIp::INTERFACES }
|
||||||
render_success(data: resp)
|
render_success(data: resp)
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Metrics/MethodLength
|
||||||
|
|
||||||
api :put, '/repp/v1/accounts'
|
api :put, '/repp/v1/accounts'
|
||||||
desc 'Update current registrar account details'
|
desc 'Update current registrar account details'
|
||||||
|
|
|
@ -78,8 +78,8 @@ class WhiteIp < ApplicationRecord
|
||||||
%w[IPv4 IPv6 Interfaces Created Updated]
|
%w[IPv4 IPv6 Interfaces Created Updated]
|
||||||
end
|
end
|
||||||
|
|
||||||
def ransackable_attributes(auth_object = nil)
|
def ransackable_attributes(*)
|
||||||
["created_at", "creator_str", "id", "interfaces", "ipv4", "ipv6", "registrar_id", "updated_at", "updator_str"]
|
authorizable_ransackable_attributes
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ module Serializers
|
||||||
@user = user
|
@user = user
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# rubocop:disable Metrics/MethodLength
|
||||||
def to_json(obj = user)
|
def to_json(obj = user)
|
||||||
json = {
|
json = {
|
||||||
id: obj.id,
|
id: obj.id,
|
||||||
|
@ -24,6 +25,7 @@ module Serializers
|
||||||
json[:certificates] = certificates
|
json[:certificates] = certificates
|
||||||
json
|
json
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Metrics/MethodLength
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ module Serializers
|
||||||
total: invoice.total,
|
total: invoice.total,
|
||||||
recipient: invoice.buyer.billing_email,
|
recipient: invoice.buyer.billing_email,
|
||||||
monthly_invoice: invoice.monthly_invoice,
|
monthly_invoice: invoice.monthly_invoice,
|
||||||
reference_no: invoice.reference_no
|
reference_no: invoice.reference_no,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
# rubocop:enable Metrics/MethodLength
|
# rubocop:enable Metrics/MethodLength
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue