ManPhamQuang / COSC2769-rmit

Further web programming - COSC2769
cosc-2769-rmit.vercel.app
MIT License
0 stars 0 forks source link

Forget password by email Endpoint #118

Closed NghiaTranUIT closed 3 years ago

NghiaTranUIT commented 3 years ago

Changelog

How to test

Request reset password email

curl --location --request POST 'localhost:5000/api/v1/users/request-reset-password' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "your_real_email_in_database@gmail.com"
}'

Reset password

curl --location --request POST 'http://localhost:5000/api/v1/users/reset-password' \
--header 'Content-Type: application/json' \
--data-raw '{
    "userId": "xxx",
    "token": "xxx",
    "password": "newpassword"
}'

Fill the userId and token and verify the password is updated

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/further-web/cosc-2769-rmit/3mLeDzgj5JoiyJq9NAtYVT1acq4N
✅ Preview: https://cosc-2769-rmit-git-feat-forget-password-by-email-further-web.vercel.app

NghiaTranUIT commented 3 years ago

Thanks for your suggestion. I've updated it 👍

Changelog

NghiaTranUIT commented 3 years ago

It's done 🙌

8bitzz commented 3 years ago

Thank you guys 👍