-
Notifications
You must be signed in to change notification settings - Fork 30
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
Jerry - email verification admin accounts #582
Jerry - email verification admin accounts #582
Conversation
Whenever an Administrator user is created, utilized newly added 'req.body.betaEmail' and 'req.body.betaPassword' to validate that the provided email address exists in the beta database.
Use req.body.actualEmail and req.body.actualPassword on the beta login route. If error caught, return 400 error.
In addition, removed unnecessary getEmails() and associated its route. Checked for Owner and Administrator roles before making request to beta login route. Made minor formatting fix in Acutal Password label.
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.
Hi! Tested your changes and they LGTM! Commented a detailed review on the FE PR. Great work!
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.
Hi @jerryren527, tested this PR and it works as intended. Left detailed review on FE PR #1446. Great job!!!
061243b
to
bcf15dc
Compare
Removed axios from package.json. And replaced axios call with fetch call.
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.
Hey @jerryren527 I’ve tested both of your PRs and they worked as expected. More details can be found in Front End PR. Nice work!
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.
Check my comment on fe #1446
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.
Left feedback and the testing video on the front end PR
Description
Related PRS (if any):
Main changes explained:
actualEmail
field to userProfile schemaHow to test:
npm install
and...
to run this PR locallyNote:
If anyone knows how to use Fetch API instead of Axios to successfully make the request to the Beta Login route on line 145 ofsrc/controllers/userProfileController.js
, then please do let me know. This is because we can avoid adding the additional axios library if we can use Fetch instead. Thanks!In my latest commit, I replaced the axios call with a fetch call.
Before (with axios):
After (with fetch):