Skip to content

Commit

Permalink
Added a service_history endpoint to claims_base_controller
Browse files Browse the repository at this point in the history
  • Loading branch information
micahaspyr committed Apr 23, 2024
1 parent eeeb3a8 commit afc14d4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/controllers/claims_base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ def show
render(json: CentralMailSubmission.joins(:central_mail_claim).find_by(saved_claims: { guid: params[:id] }))
end

def service_history
if current_user.icn
history = service.get_service_history(current_user.icn)
else

Check failure on line 49 in app/controllers/claims_base_controller.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Style/EmptyElse: Redundant `else`-clause.
# find the current user icn via querying an auth endpoint
end

render(json: history)
end

private

def filtered_params
Expand All @@ -52,4 +62,8 @@ def filtered_params
def stats_key
"api.#{short_name}"
end

def service
@service ||= VeteranVerification::Service.new
end
end

0 comments on commit afc14d4

Please sign in to comment.