Closed VEXI19 closed 6 months ago
What about using weight, height, gender and yearOfBirth instead of dateOfBirth as required? These seem like crucial properties for our app.
We don't want to force our users to add unnecessary data if they don't want to
Add POST request responsible for registering a user.
Extra notes
You can add functions to the schmes. In this case you can add createJWT function to the user scheme that will generate JWT token. Also you can use pre save function of a scheme to automatically hash the password before saving user data to data base.
Example request
POST API_URL/auth/register
Body
Required:
Optional:
Response
Response should contain token.