idurar / idurar-erp-crm

Free Open Source ERP CRM Accounting Invoicing Software | Node Js React
https://cloud.idurarapp.com
GNU Affero General Public License v3.0
6.58k stars 2.04k forks source link

Update updatePassword.js #1007

Open Deekshant1112 opened 8 months ago

Deekshant1112 commented 8 months ago

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