Skip to content

Commit

Permalink
refactor response and serializer assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
s-caso committed Nov 14, 2024
1 parent c80abfd commit a5919ed
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def claim_status
return render_claimant_id_error if claimant_id.blank?

claim_status_response = claim_status_service.get_claim_status(params, claimant_id, @form_type)
response, serializer = determine_response_and_serializer(claim_status_response, claimant_response)
response = valid_claimant_response?(claimant_response) ? claim_status_response : claimant_response
serializer = valid_claimant_response?(claimant_response) ? ClaimStatusSerializer : ToeClaimantInfoSerializer

render json: serializer.new(response)
end
Expand Down

0 comments on commit a5919ed

Please sign in to comment.