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(verification): migrate verified field #1866

Merged
merged 11 commits into from
May 14, 2021

Conversation

seaerchin
Copy link
Contributor

@seaerchin seaerchin commented May 11, 2021

Problem

Part 1 of #1522
This migrates the first /POST endpoint to the new API v3 route. This allows for us to shift our new routes to be grouped together and allows us to follow a RESTful api structure.

Solution

Shift the old endpoint to be rooted at /api/v3 and change the structure of the route so that the form id is passed as a parameter in the URL

Tests

Ported over existing tests and changed them so that the formId parameter exists on the request

Manual Test

  • create a form with a verified email field. go to the public form view; enter a email and click on verify. there should be a pop-up for the otp to be entered
  • create a form with a verified mobile number field. go to the public form view; enter a number and click on verify. there should be a pop-up for the otp to be entered

@seaerchin seaerchin changed the title Refactor/migrate verified field refactor(wip - verification): migrate verified field May 11, 2021
@seaerchin seaerchin marked this pull request as draft May 11, 2021 08:55
@seaerchin seaerchin changed the title refactor(wip - verification): migrate verified field refactor(verification): migrate verified field May 11, 2021
@seaerchin seaerchin requested review from karrui and mantariksh May 11, 2021 10:13
@seaerchin seaerchin marked this pull request as ready for review May 11, 2021 10:13
@seaerchin seaerchin requested a review from tshuli May 11, 2021 10:13
@seaerchin seaerchin requested review from chowyiyin and yong-jie May 12, 2021 05:52
src/app/modules/verification/verification.controller.ts Outdated Show resolved Hide resolved
await dbHandler.clearDatabase()

// Form without verifiable fields
const { form: emptyForm } = await dbHandler.insertEmailForm()
Copy link
Contributor

Choose a reason for hiding this comment

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

may want to inline this since this is only used in a single test. Same for the verifiable form

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i didn't do this cos it'll be reused for the related endpoints in the issues @__@ if it's an issue, i can change it!

@seaerchin seaerchin requested a review from karrui May 12, 2021 07:19
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

@seaerchin seaerchin merged commit 71f3d79 into develop May 14, 2021
@seaerchin seaerchin deleted the refactor/migrate-verified-field branch May 14, 2021 03:48
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