Skip to content

Commit

Permalink
76255 fix case alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
randomsync committed Mar 8, 2024
1 parent 8137840 commit 2d965fe
Showing 1 changed file with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,25 @@ def handle_response(opts = {})
facility_type = opts[:facility_type] || ''

statsd_metric, template_id = case facility_type.downcase
when 'oh'
case code
when TravelClaim::Response::CODE_SUCCESS
[OH_STATSD_BTSSS_SUCCESS, OH_SUCCESS_TEMPLATE_ID]
when TravelClaim::Response::CODE_CLAIM_EXISTS
[OH_STATSD_BTSSS_DUPLICATE, OH_DUPLICATE_TEMPLATE_ID]
else
[OH_STATSD_BTSSS_ERROR, OH_ERROR_TEMPLATE_ID]
end
else
case code
when TravelClaim::Response::CODE_SUCCESS
[CIE_STATSD_BTSSS_SUCCESS, CIE_SUCCESS_TEMPLATE_ID]
when TravelClaim::Response::CODE_CLAIM_EXISTS
[CIE_STATSD_BTSSS_DUPLICATE, CIE_DUPLICATE_TEMPLATE_ID]
else
[CIE_STATSD_BTSSS_ERROR, CIE_ERROR_TEMPLATE_ID]
end
end
when 'oh'
case code
when TravelClaim::Response::CODE_SUCCESS
[OH_STATSD_BTSSS_SUCCESS, OH_SUCCESS_TEMPLATE_ID]
when TravelClaim::Response::CODE_CLAIM_EXISTS
[OH_STATSD_BTSSS_DUPLICATE, OH_DUPLICATE_TEMPLATE_ID]
else
[OH_STATSD_BTSSS_ERROR, OH_ERROR_TEMPLATE_ID]
end
else
case code
when TravelClaim::Response::CODE_SUCCESS
[CIE_STATSD_BTSSS_SUCCESS, CIE_SUCCESS_TEMPLATE_ID]
when TravelClaim::Response::CODE_CLAIM_EXISTS
[CIE_STATSD_BTSSS_DUPLICATE, CIE_DUPLICATE_TEMPLATE_ID]
else
[CIE_STATSD_BTSSS_ERROR, CIE_ERROR_TEMPLATE_ID]
end
end

StatsD.increment(statsd_metric)
[claim_number, template_id]
Expand Down

0 comments on commit 2d965fe

Please sign in to comment.