Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-sinina committed Nov 13, 2024
1 parent 89e775b commit 253dfce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions app/resources/api/rest/admin/billing/service_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Api::Rest::Admin::Billing::ServiceResource < ::BaseResource
attribute :uuid

has_one :account, class_name: 'Account', always_include_linkage_data: true
has_one :service_type, class_name: 'ServiceType', foreign_key: :type_id, relation_name: :type, always_include_linkage_data: true
has_one :service_type, class_name: 'ServiceType', foreign_key: :type_id, relation_name: :type
has_many :transactions, class_name: 'Transaction', foreign_key_on: :related

ransack_filter :account_id, type: :foreign_key
Expand All @@ -24,8 +24,6 @@ class Api::Rest::Admin::Billing::ServiceResource < ::BaseResource
ransack_filter :uuid, type: :uuid
ransack_filter :created_at, type: :datetime
ransack_filter :name, type: :string
ransack_filter :account_id, type: :foreign_key
ransack_filter :type_id, type: :foreign_key
ransack_filter :initial_price, type: :number
ransack_filter :renew_price, type: :number
ransack_filter :renew_at, type: :datetime
Expand Down
4 changes: 2 additions & 2 deletions app/resources/api/rest/admin/cdr/auth_log_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def self.default_sort
has_one :gateway, class_name: 'Gateway', force_routed: true, always_include_linkage_data: true
has_one :pop, class_name: 'Pop', force_routed: true, always_include_linkage_data: true
has_one :node, class_name: 'Node', force_routed: true, always_include_linkage_data: true
has_one :origination_protocol, class_name: 'TransportProtocol', foreign_key: :origination_proto_id, force_routed: true, always_include_linkage_data: true
has_one :transport_protocol, class_name: 'TransportProtocol', foreign_key: :transport_proto_id, force_routed: true, always_include_linkage_data: true
has_one :origination_protocol, class_name: 'TransportProtocol', foreign_key: :origination_proto_id, force_routed: true
has_one :transport_protocol, class_name: 'TransportProtocol', foreign_key: :transport_proto_id, force_routed: true

filter :request_time_gteq, apply: lambda { |records, values, _options|
records.where('request_time >= ?', values[0])
Expand Down

0 comments on commit 253dfce

Please sign in to comment.