Notes
In this README file, I will write notes about the different challenges in this sections and other stuff that I consider imprtant to note out.
54. VALIDATORS, TYPES AND DEFAULTS
- Challenge N°1 :
- Create new user model.
- Set email property:
-> require it
-> trim it
-> set type to string
-> set min lenght of 1 - Create new user. Test it.
77. QUERIS
- Query by id
- Grab Id
- Loas User mongoose model
- user.findById;
78. GETTING AN INDIVIDUAL RESOURCE
- Validate th ID using isValid
- If is not valit : 404. Send back empty body
- Queryng the databas
- Succes:
- If todo sent it back.
- If no todo send back 404 with empty body.
- Error:
- 400 - and send empty body back.