Skip to content
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 appendVerifiedSpcpResponses to TypeScript #693

Merged
merged 7 commits into from
Nov 20, 2020

Conversation

mantariksh
Copy link
Contributor

This PR migrates the final SPCP factory function to TypeScript.

@mantariksh mantariksh requested review from karrui and tshuli November 19, 2020 08:37
Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

{
_id: '',
question: 'SingPass Validated NRIC',
fieldType: 'authenticationSp' as BasicField,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add typings for this? Then we can update fieldType to be a union of these typings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk, I wasn't really sure how to deal with this. one option is to create types for 'authenticationSp' and 'authenticationCp'. but actually this fieldType isn't even used anywhere, I just left it in because fieldType is a required field for ProcessedFieldResponse. I was hoping that when we eventually disentangle email-submissions.server.controller.js, we'll find a better way to handle SPCP fields than creating fake fieldTypes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tl;dr I left it like this because I thought types wouldn't be useful

@mantariksh mantariksh merged commit 9abb379 into ref/ts-spcp Nov 20, 2020
mantariksh added a commit that referenced this pull request Nov 23, 2020
* refactor: standardise usage of getUniqueMyInfoAttrs (#636)

* ref: migrate /spcp/redirect endpoint to TypeScript (#635)

* refactor: migrate /spcp/validate to TypeScript (#656)

* refactor: migrate addSpcpSessionInfo to TypeScript (#664)

* refactor: migrate isSpcpAuthenticated to TypeScript (#666)

* refactor: create addLoginFromForm static method (#679)

* refactor: move passThroughSpcp business logic into service (#667)

* refactor: migrate SPCP /login endpoints to TypeScript (#680)

* refactor: migrate appendVerifiedSpcpResponses to TypeScript (#693)

* docs: add docs for all new functions (#696)

* test: add tests for SPCP login endpoints (#695)

* feat: log login HTML

* fix: change title check to null-only
@liangyuanruo liangyuanruo deleted the ref/ts-spcp-append branch December 22, 2020 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants