Skip to content

Commit

Permalink
Route update and removing history variable from service_history metho…
Browse files Browse the repository at this point in the history
…d in the claims base controller
  • Loading branch information
micahaspyr committed Apr 25, 2024
1 parent 72b0709 commit e1ca3bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
12 changes: 2 additions & 10 deletions app/controllers/claims_base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class ClaimsBaseController < ApplicationController
skip_before_action(:authenticate)
before_action :load_user, only: :create
before_action :load_user, only: %i[create service_history]

# Creates and validates an instance of the class, removing any copies of
# the form that had been previously saved by the user.
Expand Down Expand Up @@ -44,14 +44,7 @@ def show
end

def service_history
history = if current_user.icn
service.get_service_history(current_user.icn)
else
# find the current user icn via querying an auth endpoint
{ data: [], status: 401 }
end

render(json: history)
render(json: service.get_service_history(current_user.icn))
end

private
Expand All @@ -68,5 +61,4 @@ def service
@service ||= VeteranVerification::Service.new
end

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

View workflow job for this annotation

GitHub Actions / Linting and Security

Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body end.
def find_by_icn; end
end
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@
get 'document_download/:id', action: 'document_download'
post 'submit_coe_claim'
post 'document_upload'
get 'service_history/:icn'
end

get 'terms_of_use_agreements/:version/latest', to: 'terms_of_use_agreements#latest'
Expand Down

0 comments on commit e1ca3bd

Please sign in to comment.