MuscleMate / BackEnd

API for MuscleMate app
3 stars 0 forks source link

Add POST register request #15

Closed VEXI19 closed 6 months ago

VEXI19 commented 6 months ago

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:

v4m3rrr commented 6 months ago

What about using weight, height, gender and yearOfBirth instead of dateOfBirth as required? These seem like crucial properties for our app.

VEXI19 commented 6 months ago

We don't want to force our users to add unnecessary data if they don't want to