[x] Updated the title from "Update Team Details" to "Update Board Owners" and updated description
[x] Updated the form so that team emails are pre-populated if the email reset token is valid
[x] Added validation (the first email field is required and always shows error if focused and there is not a valid email, and second email field is not required and only shows error if something is typed that is not a valid email)
[x] Hooked up the form to save new emails on submit
[x] Created emails saved confirmation
API:
[x] Added an email reset token table to the db
[x] Created endpoint to create email reset token and send email (not hooked up to the UI yet)
[x] Created endpoint to check if token is valid and what the lifetime of the email reset token is (will be used in a later feature; was easier to copy over from the password reset token controller)
Demo
Update Board Owners Page
Confirmation:
Testing Instructions
1) Create a team with one or two emails
2) Use postman or something to create an email reset token at POST http://localhost:3000/api/email/email-reset-request using the following as the body:
{
"teamName": "Your Team Name",
"email": "your@email.com"
}
3) Go to h2 and get the email reset token from the email reset token table ( http://localhost:8080/h2 ). Note the token lasts for 10min.
4) NOW go to the app at, http://localhost:3000/email/reset?token={{email-reset-token}}
5) Ensure that the update board owners page shows up and ensure that the form is pre-populated with the emails you added to your team.
6) Change the emails and save them.
7) Now log into the app, go to Settings>Account and ensure the new emails show up there
What was done:
UI:
API:
Demo
Update Board Owners Page
Confirmation:
Testing Instructions
1) Create a team with one or two emails 2) Use postman or something to create an email reset token at
POST http://localhost:3000/api/email/email-reset-request
using the following as the body:3) Go to h2 and get the email reset token from the email reset token table (
http://localhost:8080/h2
). Note the token lasts for 10min. 4) NOW go to the app at,http://localhost:3000/email/reset?token={{email-reset-token}}
5) Ensure that the update board owners page shows up and ensure that the form is pre-populated with the emails you added to your team. 6) Change the emails and save them. 7) Now log into the app, go to Settings>Account and ensure the new emails show up there