Fixed the bug : Unable to create new users for the website
PR Title
The purpose of this Pull Request is to fix #21
Description
This fix will ensure that whenever a user clicks on Create an account button a new user will be created.
How you solved
The issue was in user-controller.js within the signupUser function. There was a typo: when the user was null (indicating the user didn't exist), we responded with a 400 status code and a message stating that the user already existed. This was incorrect. Instead, we should respond this way when the user does exist. I simply replaced == with != in the code, and now it works correctly
Checklist
[x] I have Made this contribution as per the CONTRIBUTING guide in this repo
Fixed the bug : Unable to create new users for the website
PR Title
The purpose of this Pull Request is to fix #21
Description
This fix will ensure that whenever a user clicks on Create an account button a new user will be created.
How you solved
The issue was in user-controller.js within the signupUser function. There was a typo: when the user was null (indicating the user didn't exist), we responded with a 400 status code and a message stating that the user already existed. This was incorrect. Instead, we should respond this way when the user does exist. I simply replaced == with != in the code, and now it works correctly
Checklist