-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
80453 pt2 rehydrate 5655 controller #16459
Conversation
def rehydrate | ||
submission_id = params[:submission_id] | ||
|
||
DebtsApi::V0::FsrRehydrationService.attempt_rehydration(user_uuid: current_user.uuid, submission_id:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is submission_id:
missing a value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope! Ruby has a fun little bit of syntactic sugar where you don't need to specify a value for hash key-value pairs if the key and value are the same. In this case line 33 defines submission_id
in scope so we don't need to specify submission_id: submission_id
. If you want to make doubly sure that it works, check out modules/debts_api/spec/request/debts_api/v0/financial_status_reports_controller_spec.rb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Summary
We're exposing api endpoints to allow the frontend to rehydrate a form for a previously submitted FSR.
Related issue(s)
Testing done
Specs added.
What areas of the site does it impact?
Will eventually impact the FSR and debt portal. Currently these endpoints are used by nobody.
Acceptance criteria
Rehydrate endpoint only allows a user to rehydrate InProgressForm for their submissions.