Wear test: API reset password endpoint

Register
Submit a solution
The challenge is finished.

Challenge Overview

Please review challenge 2715 which gives more details in how to use the queue and sendgrid. �� The .env file is supplied in the post registration info and should be pre-configured to run locally and still use our sendgrid account but you will need to have rabbit-MQ running locally.

  1. Create an endpoint called passwordreset that takes a single parameter which may be an username (user.username) or an email (user.email).
  2. Determine which fields was passed (username or email) via presence of @ sign
  3. Ensure that the field passed in unique in the database. If it is not return the error message " Sorry it looks like we found more than one account please contact support@mesh01.com "
  4. If the username or email is not found return a message "Sorry we could not find your account please contact support@mesh01.com"
  5. If only one record is found set the password to a random 8 char of alpha and numeric
  6. Return a success message {success: " A new password has been sent to {{user.email}"

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30037703