Closed singhayushh closed 3 years ago
1. employee can't be created using same phone or email
@ayan-biswas0412 yes, I have added a check for that.
Line 17 -> for customers and line 31 -> for employees in controller/user.controller.js
@singhayushh I will merge your PR with first priority , please resolve the thing I have commented and ask for a review I will merge it
To make sure that no user registers as employee or customer with same phone number or email twice, I have set the email and phone number key to be unique in the mongo schema as well as provided a check whether the email or phone number exists in the database under the registering controller. I hope the raised issue is resolved.
For the check that is failing, variables from request body are needed for verifying the password and logging in the user. I have no clue why the check fails for using variables passed by the user.
@singhayushh You can check at the particular checks by clicking on details
link it will show you where your checks are failing, please look into it....
@aniketsingh98571 Yes I did that. Only after checking the details, I came to know that the checking is failing because I'm using parameters that the user will pass.
And not knowing why such a check causes failure, I commented the above.
@singhayushh you can check on StackOverflow for the issue.
@aniketsingh98571 All checks have passed. I hope the PR is all good now.
Fixes #101
Changes done
/docs
route has been created where all API descriptions are available along with success response body.Screenshots of the changes (If any) -
User Registration - other routes have been tested as well
API Documentation - as seen under
/docs
routeNote: Please check Allow edits from maintainers. if you would like us to assist in the PR.
✅️ By submitting this PR, I have verified the following