-
Notifications
You must be signed in to change notification settings - Fork 87
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
refactor: migrate MyInfo functionality to TypeScript #560
Conversation
c78d5f8
to
79a5c38
Compare
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.
lgtm, do test submitting for all MyInfo fields before merging
d1bf584
to
1a6e9c6
Compare
waiting to finish writing tests + test on staging before merging |
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.
very nice and clean 😍
unfortunately MyInfo staging is still down so we can't test this on staging yet. will give them a call later today |
7295fb2
to
87599eb
Compare
myinfo staging still not working |
87599eb
to
50a4b13
Compare
* test: add constants * refactor: inline myinfo_hash tests * test: add utils tests * test: add MyInfoService tests * test: add factory tests
50a4b13
to
0aa68dd
Compare
This PR extracts MyInfo functionality from combined SPCP/MyInfo modules, and places it in its own service written in TypeScript.
Why a service and not a module?
I wrote this with the future PublicForm migration in mind. Currently, the two middlewares exported by the MyInfo controller (
addMyInfo
andverifyMyInfoVals
) are middlewares in the form retrieval and submissions flow respectively. However, we want the logic in all these middlewares to eventually be combined into one function which calls several services. The intention here is for MyInfo to be one of those services, and for the logic in the current MyInfo controller functions to be moved into the PublicForm controllers in future.What about tests?
I have removed the old tests so that this PR builds successfully. The new tests will come in a separate PR and will be merged into this branch.