Skip to content

Commit

Permalink
update claim_evidence_request method
Browse files Browse the repository at this point in the history
  • Loading branch information
SanthiParakal133 committed Oct 8, 2024
1 parent 6aae3ed commit 1f0659d
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions app/services/external_api/vbms_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,13 @@ def self.process_fetch_veteran_file_list_response(response)
end

def self.claim_evidence_request
user_css_id = if RequestStore[:current_user].present? && FeatureToggle.enabled?(:send_current_user_cred_to_ce_api)
RequestStore[:current_user].css_id
else
ENV['CLAIM_EVIDENCE_VBMS_USER']
end

station_id = if RequestStore[:current_user].present? && FeatureToggle.enabled?(:send_current_user_cred_to_ce_api)
RequestStore[:current_user].station_id
else
ENV['CLAIM_EVIDENCE_STATION_ID']
end

ClaimEvidenceRequest.new(
user_css_id: user_css_id,
station_id: station_id
user_css_id: allow_user_info? ? RequestStore[:current_user].css_id : ENV['CLAIM_EVIDENCE_VBMS_USER'],
station_id: allow_user_info? ? RequestStore[:current_user].station_id : ENV['CLAIM_EVIDENCE_STATION_ID']
)
end

def self.allow_user_info?
RequestStore[:current_user].present? && FeatureToggle.enabled?(:send_current_user_cred_to_ce_api)
end
end

0 comments on commit 1f0659d

Please sign in to comment.