idurar-erp-crm icon indicating copy to clipboard operation
idurar-erp-crm copied to clipboard

Update updatePassword.js

Open Deekshant1112 opened this issue 2 years ago • 0 comments

1 Used bcrypt.genSalt and bcrypt.hash methods which are asynchronous instead of synchronous bcrypt.hashSync.

2 Simplified salt generation by using bcrypt.genSalt. Renamed variables for clarity and consistency.

3 Improved error handling using try-catch blocks.

4 Updated the status codes for better response handling. 5 Used template literals for string interpolation.

Description

Please provide a brief description of the changes or additions made in this pull request.

Related Issues

If this pull request is related to any issue(s), please list them here.

Steps to Test

Provide steps on how to test the changes introduced in this pull request.

Screenshots (if applicable)

If your changes include visual updates, it would be helpful to provide screenshots of the before and after.

Checklist

  • [ ] I have tested these changes
  • [ ] I have updated the relevant documentation
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the codebase
  • [ ] My changes generate no new warnings or errors
  • [ ] The title of my pull request is clear and descriptive

Deekshant1112 avatar Mar 14 '24 10:03 Deekshant1112